#name method on java classes strips the outer class #1117

wdomburg opened this Issue Oct 11, 2013 · 1 comment


None yet

2 participants

irb(main):002:0> Java::ComZimbraCsZclient::ZMessage::ZMimePart.name
=> "Java::ComZimbraCsZclient::ZMimePart"
irb(main):003:0> Java::ComZimbraCsZclient::ZMimePart.name
NameError: cannot load Java class com.zimbra.cs.zclient.ZMimePart
        from org/jruby/javasupport/JavaClass.java:1227:in `for_name'
        from org/jruby/javasupport/JavaUtilities.java:34:in `get_proxy_class'
        from file:/opt/jruby-1.7.2/lib/jruby.jar!/jruby/java/java_package_module_template.rb:4:in `const_missing'
        from (irb):3:in `evaluate'
        from org/jruby/RubyKernel.java:1066:in `eval'
        from org/jruby/RubyKernel.java:1392:in `loop'
        from org/jruby/RubyKernel.java:1174:in `catch'
        from org/jruby/RubyKernel.java:1174:in `catch'
        from /opt/jruby/bin/jirb:13:in `(root)'
irb(main):004:0> Java::ComZimbraCsZclient::ZMessage::ZMimePart.java_class
=> class com.zimbra.cs.zclient.ZMessage$ZMimePart
headius commented Oct 21, 2013

More specifically, this affects inner classes; they do not show the outer class in their #name, which causes errors if you attempt to use that name to access them.

In the reported case, the name should be Java::ComZimbraCsZclient::ZMessage::ZMimePart.

@headius headius closed this in 58c6a27 Oct 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment