type paths for some annotated array references
wdietl at gmail.com
Wed Apr 17 16:10:50 PDT 2013
> I had another quick question, I'm trying to determine whether I need a type
> path in a certain situation.
> I compile two statements:
> Object o = new @A String;
> Object o = new String @A;
> with javac build 81 (or seemingly with the latest jsr308 lang tools, if I'm
> using them correctly), I get the same output attribute:
> 0: #15(): NEW, offset=8
> I think I expected the first one to have a type path:
> 0: #15(): NEW, offset=8, location=[ARRAY]
Thanks for noticing this mismatch!
I've fixed it:
If you're interested in the JSR 308 reference implementation, the
right mailing list is:
Comments about the spec should go to:
jsr308-discuss is for jsr308-langtools, which is an extension of the
official JSR 308 RI.
> ps. maybe the second byte of the type path entry for 'deeper in array' could
> indicate how much deeper into the array (similarly for deeper in nested
> type). Use two of them if going deeper than 255 levels in the array but if
> you have arrays that deep you probably have other problems :) Not sure how
> much you care about saving a few bytes here and there...
This was discussed and rejected by the EG (unfortunately, as I also
Please do let us know if you come across anything else!
More information about the type-annotations-dev