RFR [JDK8]: 7153951: -Xlint:auxiliaryclass
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Oct 22 12:24:23 PDT 2012
On 10/17/2012 03:13 AM, Fredrik Öhrström wrote:
> http://cr.openjdk.java.net/~ohrstrom/webrev-7153951-auxiliaryclass-v6/
>
> Ready to be pushed?
>
> //Fredrik
>
Fredrik,
The code in ClassReader looks like it is in the wrong place. I would
recommend putting the code into fillIn(ClassSymbol) and not in the
attribute reader for the SourceFile attribute. There is no requirement
that a SourceFile attribute must be present. JVMS 7, 4.7.10 specifies
that the SourceFile attribute is optional.
The test
test/tools/javac/warnings/AuxiliaryClass/SelfClassWithAux.java.html
looks like a no-op, since @test is not the first token in the comment.
Also, the test looks weak, because you are not checking that the
expected errors are generated. Even worse, you have omitted the /fail,
so the test is written to expect the compilations to succeed, even
though you are testing for errors. I would expect to see the "@run
compile" lines to look more like
@compile/fail/ref=GOLDEN_FILE.out -XDrawDiagnostics -Werror ...etc...
-- Jon
-- Jon
More information about the compiler-dev
mailing list