[Checkers] [JSR308] @Target(ElementType.TYPE_USE)
mernst at csail.mit.edu
Tue Jun 24 11:07:29 EDT 2008
> Apparently, the compiler does not implement ElementType.TYPE_USE; in
> fact it does not enforce annotations Target policies when appearing in
> JSR308-specific locations.
I didn't realize that ElementType.TYPE_USE wasn't implemented.
Enforcing Target policies has been on my to-do list for a long time. It
never seemed important enough to prioritize. Now that we have been called
on it in a public forum, maybe we need to increase its priority. I still
don't feel it's urgent -- it is more of a PR issue.
> I think that can be corrected easily. However, given that ElementType
> is in rt.jar, I suspect that we might have similar issues to
> 'Massager.printMessage method not found' errors.
For printMessage, we were removing something from the class file (well, we
changed its signature, so the old one disappeared and the new one
For ElementType.TYPE_USE, we will only be adding a new element to the class
file (this backward compatibility was a Sun requirement!). So maybe we
don't have to worry about the problem?
More information about the checkers