Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.4
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Java Integration
-
Testcase included:yes
-
Number of attachments :
Description
Referencing a Java class with a mixed-case package name, e.g. Java::mixed.Case.Example, fails. Although a mixed-case package violates the Java naming standard, it is legal. The use case is integration with existing Java code that cannot be modified.
Test case:
1. Make a jar file with the trivial Java class:
package mixed.Case;
public class Example
{
}
2. require the jar file
3. Java::mixed.Case.Example #=> NameError
See the comment here: https://github.com/jruby/jruby/blob/e6c371fb89e3f848645eb140769d58d427a0fe49/src/org/jruby/javasupport/Java.java#L929-941
...which was introduced by Charlie in https://github.com/jruby/jruby/commit/3f257adced4b556da52c19f02d98d74188d8d1a1