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

merged 1 commit into from Sep 30, 2016


None yet

2 participants


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/ to read failed line

       Signature Parse error: expected '<' or ';' but got :
        Remaining input: :0x2b80e5a9;
     # java.lang.Class.createAnnotationData(java/lang/
     # java.lang.Class.annotationData(java/lang/
     # java.lang.Class.getDeclaredAnnotations(java/lang/
     # java_integration.fixtures.Reflector.getDeclaredAnnotation(java_integration/fixtures/
     # java.lang.reflect.Method.invoke(java/lang/reflect/
     # org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/
     # org.jruby.javasupport.JavaMethod.invokeStaticDirect(org/jruby/javasupport/
     # 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 Fix Java::JavaLangReflect::GenericSignatureFormatError when reflectin…
…g reified annotation values
@headius headius merged commit 895e1f4 into jruby:master Sep 30, 2016

0 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
continuous-integration/travis-ci/pr The Travis CI build failed
@headius headius added this to the JRuby milestone Sep 30, 2016
headius commented Sep 30, 2016


@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