JDK 9 RFR of JDK-8039102: Add raw and unchecked lint warnings to build of jdk repository
Joe Darcy
joe.darcy at oracle.com
Fri Jul 11 21:48:50 UTC 2014
PS Asking for a re-review of
8039102: Add raw and unchecked lint warnings to build of jdk repository
under a different formulation of the change to take into account the
effects of 8048839: Reverse sense of -Xlint options in build of jdk repo:
diff -r 9d1e46cc3972 make/Setup.gmk
--- a/make/Setup.gmk Fri Jul 11 14:06:42 2014 -0700
+++ b/make/Setup.gmk Fri Jul 11 14:45:43 2014 -0700
@@ -27,7 +27,7 @@
# To build with all warnings enabled, do the following:
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
-JAVAC_WARNINGS := -Xlint:all,-deprecation,-rawtypes,-unchecked -Werror
+JAVAC_WARNINGS := -Xlint:all,-deprecation -Werror
# Any java code executed during a JDK build to build other parts of
the JDK must be
# executed by the bootstrap JDK (probably with -Xbootclasspath/p: )
and for this
Thanks,
-Joe
On 04/08/2014 11:22 PM, Erik Joelsson wrote:
> It's always nice to see more of these getting enabled. Looks good!
>
> /Erik
>
> On 2014-04-08 19:54, Joe Darcy wrote:
>> Hello,
>>
>> With the effort to clear the jdk repo of rawtypes and unchecked
>> warnings (see JDK-8039096), I'd like to get an early review for the
>> happy day when those warnings can be turned on in the build:
>>
>> JDK-8039102: Add raw and unchecked lint warnings to build of jdk
>> repository
>>
>> The patch is as expected:
>>
>> diff -r f1cc18a769e5 make/Setup.gmk
>> --- a/make/Setup.gmk Tue Apr 08 17:36:13 2014 +0200
>> +++ b/make/Setup.gmk Tue Apr 08 10:45:40 2014 -0700
>> @@ -27,7 +27,7 @@
>>
>> # To build with all warnings enabled, do the following:
>> # make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
>> -JAVAC_WARNINGS :=
>> -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,cast,classfile,dep-ann,divzero,empty,overloads,serial,static,try,varargs
>> -Werror
>> +JAVAC_WARNINGS :=
>> -Xlint:-deprecation,-overrides,auxiliaryclass,cast,classfile,dep-ann,divzero,empty,overloads,rawtypes,serial,static,try,unchecked,varargs
>> -Werror
>>
>> # Any java code executed during a JDK build to build other parts of
>> the JDK must be
>> # executed by the bootstrap JDK (probably with -Xbootclasspath/p: )
>> and for this
>>
>> Full webrev:
>>
>> http://cr.openjdk.java.net/~darcy/8039102.0/
>>
>> There are several source code related lint warnings not currently
>> enabled in the jdk build.
>>
>> fallthrough Warn about falling through from one case of a
>> switch statement to the next.
>> finally Warn about finally clauses that do not
>> terminate normally.
>> overrides Warn about issues regarding method overrides.
>> rawtypes Warn about use of raw types. (see JDK-8039096)
>> unchecked Warn about unchecked operations (see JDK-8039096)
>>
>> Once a few more of these are resolved, it will probably be time to
>> switch JAVAC_WARNINGS more fully to an opt-out syntax for any
>> remaining problem areas:
>>
>> -Xlint:all,-deprecation,-processing, ...
>>
>> Thanks,
>>
>> -Joe
>
More information about the build-dev
mailing list