[type-annos-observers] some errors in the specification (january 30 version)
Werner Dietl
wdietl at gmail.com
Sat Mar 2 15:07:15 PST 2013
Hi Eric,
> I downloaded the latest langtools version (langtools-a9ea02b425ff) and now
> the problem with Method vs Code is fixed, thanks!
Great, thanks for verifying!
> But I now have another issue, with annotations on throws clauses. The
> specification uses an unsigned short
> (http://types.cs.washington.edu/jsr308/specification/java-annotation-design.html#class-file:ext:ri:throws)
> but langtools uses an unsigned byte (as can be seen from
> com/sun/tools/classfile/TypeAnnotation.java). ASM uses an unsigned short, so
> I get errors while trying to read a class produced with langtools.
>
> Which version is correct? The specification or the reference implementation?
Sorry about that. Usually the spec is correct. In December we had this
brief discussion:
http://mail.openjdk.java.net/pipermail/type-annotations-spec-observers/2012-December/000056.html
but I hadn't verified whether the RI implements this correctly.
I've now changed throws and extends to shorts, as in the discussion in
the message above.
I've pushed this fix:
http://hg.openjdk.java.net/type-annotations/type-annotations/langtools/rev/15010e417af5
Note how the ClassReader and other parts already used u2s and only the
writer was inconsistent.
The tl build.properties still uses 1.7 as version number:
http://hg.openjdk.java.net/jdk8/tl/langtools/file/55cca2f38ee6/make/build.properties
As type-annotations is a clone of that we're also 1.7. I don't know at
what point this will be changed.
Thanks, Remi, for helping with the build!
Please do let me know if you find any other discrepancies!
cu, WMD.
--
http://www.google.com/profiles/wdietl
More information about the type-annotations-spec-comments
mailing list