Community
Participate
Working Groups
Build ID: 20090619-0625 Steps To Reproduce: 1. Create .class file of this annotation : public @interface MonAnnotation { String test1() default "\0"; char test2() default '\0'; } 2. Open the class file in the ClassFileEditor. 3. default value of test1() will be printed normally. default value of test2() will not, probably because the character has not been escaped. More information:
Reproduced. We print: // Method descriptor #8 ()Ljava/lang/String; public abstract String test1(); Annotation Default: "\0" (constant type) // Method descriptor #12 ()C public abstract char test2(); Annotation Default: ' ' (constant type) } Instead of '\0'. Will fix for 3.6M2. No need to backport for 3.5.1.
Created attachment 144258 [details] Proposed fix
Released for 3.6M2. Regression test added in: org.eclipse.jdt.core.tests.compiler.regression.ClassFileReaderTest_1_5#test016
Verified for 3.6M2