[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.jdt] Re: Bug on IMemberValuePair ?

Olivier Thomann a écrit :
Romain Dervaux a écrit :
Hi

I am reading annotations on types, methods and fields of ITypes in .class files.

I noticed that for the @Retention annotation, i never retrieve the good value.
For example, on the below code, the IMemberValuePair associated with the @Retention annotation is a IMemberValuePair.K_QUALIFIED_NAME and returns "java.lang.annotation.RetentionPolicy.SOURCE".


@Retention(value = RetentionPolicy.RUNTIME)
public @interface MonAnnotation {

    String test1() default "\0";
    char test2() default '\0';
}


Also something i noticed :
If you open the .class file of the previously mentionned annotation in the ClassFileEditor, we will get a bug (i think) on the test2() method. The character (default value) is not escaped.
Please open bug reports for both issues (ClassFileEditor and the IMemberValuePair) against JDT/Core as sonn as possible.
I'll investigate them as soon as they are entered. Please provide build ids, steps to reproduce.
Thanks,
--
Olivier


Bugs open.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=286405
https://bugs.eclipse.org/bugs/show_bug.cgi?id=286407