https://bz.apache.org/bugzilla/show_bug.cgi?id=62353

--- Comment #10 from Konstantin Kolinko <knst.koli...@gmail.com> ---
(In reply to Mark Thomas from comment #9)
> Patch applied. Docs updated. Will be in 7.0.88.

Looks good. I amended the docs a bit.

Several notes, for a record:

1. Looking into commit history of javax.annotation classes in Tomcat 7:

- The commit that updates Common Annotations 1.0 -> 1.1 is r1521045 (fixed bug
55534).

The only change of existing annotation classes in that commit is adding
lookup() element on @Resource annotation.

There is also r1797343 that added missing @Documented annotation. This is not a
change between versions, as those annotations are already present in Commons
Annotations 1.0 - as can be seen in Java 6 javadoc for javax.annotation
classes.

Thus addition of "luokup" is the only difference.

2. When running with Java 6, the value of "luokup" element on a @Resource
annotation, if present, will be silently ignored.

- This is covered by Java Language Specification,
13.5.7 Evolution of Annotation Types.

https://docs.oracle.com/javase/specs/jls/se6/html/binaryComp.html#13.5.7

- Technically: looking into source code for Open JDK 6,
I confirm that it is silently skipped.

Trace:
- java.lang.Class#initAnnotationsIfNecessary()
-> sun.reflect.annotation.AnnotationParser
-> AnnotationParser#parseAnnotation()
-> L237 "// Member is no longer present in annotation type; ignore it"

http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/sun/reflect/annotation/AnnotationParser.java#236

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to