New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Java::JavaLangReflect::GenericSignatureFormatError when reflecting reified annotation values #4187

Merged
merged 1 commit into from Sep 30, 2016

Conversation

Projects
None yet
2 participants
@cheister
Copy link

cheister commented Sep 29, 2016

In 84eb04f the java class names for anonymous classes were changed to have a colon in them. This causes problems when java tries to use reflection to get the classname because colon isn't a valid classname character.

The error from java is:

Failure/Error: Unable to find java.lang.Class.createAnnotationData(java/lang/Class.java to read failed line

     Java::JavaLangReflect::GenericSignatureFormatError:
       Signature Parse error: expected '<' or ';' but got :
        Remaining input: :0x2b80e5a9;
     # java.lang.Class.createAnnotationData(java/lang/Class.java:3521)
     # java.lang.Class.annotationData(java/lang/Class.java:3510)
     # java.lang.Class.getDeclaredAnnotations(java/lang/Class.java:3477)
     # java_integration.fixtures.Reflector.getDeclaredAnnotation(java_integration/fixtures/Reflector.java:94)
     # java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
     # org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:468)
     # org.jruby.javasupport.JavaMethod.invokeStaticDirect(org/jruby/javasupport/JavaMethod.java:370)
     # RUBY.block in (root)(/Users/cheister/Development/jruby/spec/java_integration/reify/become_java_spec.rb:207)

This PR just changes the classname back to using an underscore instead of a colon.

Chris Heisterkamp

@headius headius merged commit 895e1f4 into jruby:master Sep 30, 2016

0 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details

@headius headius added this to the JRuby 9.1.6.0 milestone Sep 30, 2016

@headius

This comment has been minimized.

Copy link
Member

headius commented Sep 30, 2016

Thanks!

@cheister cheister deleted the cheister:fix-generic-signature-format-error branch Sep 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment