The compiler appears to be emitting the tag 'I' for annotation member values of type byte in place of the specified tag 'B'. This can be seen by looking at the class file for the followin program:
import static java.lang.annotation.VisibilityLevel.RUNTIME;
import java.lang.annotation.*;
@Foo(17) public class Junk {
public static void main(String[] args) {
System.out.println(Junk.class.getAnnotation(Foo.class).value());
}
}
@Visibility(RUNTIME) @interface Foo {
byte value();
}
Similarly, it looks like 'I' is being emitted in place of 'S' for short, in place of 'C' for char, and in place of 'Z' for boolean.
Finally, it looks like 'I' is being emitted in place of J for long *defaults*. This is particularly serious, as it results in information loss.
###@###.### 2003-12-05
import static java.lang.annotation.VisibilityLevel.RUNTIME;
import java.lang.annotation.*;
@Foo(17) public class Junk {
public static void main(String[] args) {
System.out.println(Junk.class.getAnnotation(Foo.class).value());
}
}
@Visibility(RUNTIME) @interface Foo {
byte value();
}
Similarly, it looks like 'I' is being emitted in place of 'S' for short, in place of 'C' for char, and in place of 'Z' for boolean.
Finally, it looks like 'I' is being emitted in place of J for long *defaults*. This is particularly serious, as it results in information loss.
###@###.### 2003-12-05