graphql-spqr icon indicating copy to clipboard operation
graphql-spqr copied to clipboard

Documentation incorrectly reports OracleJDK as being free from type annotation bug

Open kittylyst opened this issue 5 years ago • 2 comments

The bug https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8202473 that is called out in "Known Issues" is reported as only existing in OpenJDK, not in OracleJDK.

This is incorrect, OracleJDK 8u202 (the last freely available version) does still exhibit this bug, and the bug database still lists the bug status as "Open" (i.e. unfixed):

C02X3A4AJGH6:experiments bevans$ java Foo true Exception in thread "main" java.lang.annotation.AnnotationFormatError: Duplicate annotation for class: interface Foo$SampleTypeAnnotation: @Foo$SampleTypeAnnotation() at sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:360) at sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.(AnnotatedTypeFactory.java:139) at sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedWildcardTypeImpl.(AnnotatedTypeFactory.java:274) at sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:82) at sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedParameterizedTypeImpl.getAnnotatedActualTypeArguments(AnnotatedTypeFactory.java:255) at Foo.main(Foo.java:22) C02X3A4AJGH6:experiments bevans$ java -version java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

kittylyst avatar Jun 06 '19 15:06 kittylyst

I believe the bug database you linked to pertains to OpenJDK. Can you actually reproduce the issue in OracleJDK? Asking because I've been using it for the development of SPQR the entire time, and never encountered the error. On the other hand, all the users who reported the issue were on OpenJDK. So I think what the README says is correct.

kaqqao avatar Jun 16 '19 16:06 kaqqao

@kaqqao My original comment shows a repro of bug 8202473 on Oracle 8u202 on Mac. To be honest, given my knowledge of how the development process of OpenJDK works, and how OracleJDK is derived from it, I can't see how a bug like this would get fixed on OracleJDK but not on OpenJDK.

Do you have an actual reproducible case which works correctly for OracleJDK but not OpenJDK? I have many different JVMs on my work system and am happy to help you try to repro if you like?

kittylyst avatar Jun 16 '19 16:06 kittylyst