heads up: type annos issue
bhavesh.x.patel at oracle.com
Fri Nov 30 14:49:54 PST 2012
I am working on uploading the test pages with issues I have noticed with the annotations. I will send out an email later today with pointers to these test pages.
----- Original Message -----
From: wdietl at gmail.com
To: jonathan.gibbons at oracle.com
Cc: type-annotations-dev at openjdk.java.net
Sent: Friday, November 30, 2012 2:21:04 PM GMT -08:00 US/Canada Pacific
Subject: Re: heads up: type annos issue
Hi Jon, Bhavesh,
On Fri, Nov 30, 2012 at 11:17 AM, Jonathan Gibbons
<jonathan.gibbons at oracle.com> wrote:
> Yesterday, Bhavesh reported that while working on type annotations support
> for javadoc, he noted that when he put a type annotation on a wildcard bound
> (which may have been Object), it ended up on *all* instances of Object, and
> thus showed up throughout the javadoc for the class. We suspect this is due
> to the type annotation being stored in the wrong place. Bhavesh will be
> following up with detailed evidence, but in the meantime, have you seen
> anything like this?
No, I've not seen such behavior. If you could send a small example
program I can investigate.
We do have test cases that annotations on the wildcard and its bound
are stored correctly, for example see
"methodParamAsWildcard()". That method has annotations on the wildcard
and the String bound and a later use of String does not seem to have
an extra annotation. But maybe the behavior is different for Object.
> Would it help to to have a type/symbol printer that pretty prints the
> type/symbol showing all annotations? That way we can (a) take javadoc out
> of the loop here, (b) write test cases more easily/
Yes, having better testing support for this would be helpful. The
referenceinfos tests work from the classfile information, if I
remember correctly. Having tests that work directly on the attributed
AST would be good.
More information about the type-annotations-dev