RFR [JDK8]: 7153951: -Xlint:auxiliaryclass, approved if you fix issue
Jonathan Gibbons
jonathan.gibbons at oracle.com
Thu Oct 25 19:26:52 PDT 2012
Fredrik,
I'm sorry, I missed this before, but in your tests, @clean takes a class
name, not a file name, so you should not include ".class" after each
class name.
Fix that, and I approve the changes. If you need me to push the changes
for you, I can do that.
-- Jon
On 10/25/2012 07:17 AM, Fredrik Öhrström wrote:
> 2012-10-23 21:08, Jonathan Gibbons skrev:
>> The primary purpose of the diags/examples tests are to provide a
>> simple example of each of the diagnostics in context, for the benefit
>> of reviewers, and the localization team, to see the sort of program
>> that can trigger the diagnostic. While there is some
>> self-consistency checking to ensure that the declared keys are
>> generated, there is no check on the overall diagnostic, such as the
>> file being reported, the position within the file, any arguments for
>> the diagnostic, and so on. It is also a non-goal of the
>> diags/examples area to provide exhaustive coverage of the different
>> ways that the diagnostic may be generated.
>>
>> The standard way of providing more complete test coverage for
>> diagnostics is to make sure that every test that uses "@compile/fail"
>> also specifies a golden file for the diagnostics. Since the golden
>> file can potentially depend on external or somewhat unrelated factors
>> like the absolute path of the source file, or the exact text of the
>> error message, we use the -XDrawDiagnostics option to print out the
>> salient details of the diagnostic, in a way that is independent of
>> those external factors.
>>
>> Thus, any test containing @compile/fail should use a line like
>> @compile/fail/ref=Test.out -XDrawDiagnostics Test.java
>>
>> adding in additional options, or changing the file names as needed.
>>
>
> Comment split and out files added for verification using /ref=, please
> verify:
>
> http://cr.openjdk.java.net/~ohrstrom/webrev-7153951-auxiliaryclass-v7/
>
> //Fredrik
>
More information about the compiler-dev
mailing list