#1939 closed enhancement (fixed)
Fix javac compiler warnings
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | minor | Milestone: | BASE 3.6 |
Component: | build | Version: | |
Keywords: | Cc: |
Description
We are currently compiling all code with -Xlint:unchecked
which generate warnings when mixing parameterized types with un-parameterized types. But there are a lot more options to enable for the Xlint parameter. See http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html#nonstandard
Trying with -Xlint:all
hits the root with 100+ warnings for almost all compilation steps. It might be worth going through this and see if there is something important.
Change History (10)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 10 years ago
comment:4 by , 10 years ago
comment:5 by , 10 years ago
comment:6 by , 10 years ago
[6871] should fix warnings after setting -Xlint:dep-ann
. Except for 'rawtypes' none of the other 'Xlint' options generate any warnings. On the other hand the 'rawtypes' option generate lots and lots and lots of warnings.
comment:7 by , 10 years ago
(In [6874]) References #1939: Fix javac compiler warnings
Get rid of generic parameter <D extends BasicData>
on BasicItem
since it is an internal implementation detail only. As a consequence, all subclasses need to implement the getData()
method and cast the result to the proper data-layer subclass. This is more or less the same as was automatically generated by the compiler before (but without the public visibility of it).
This solves a lost of warnings about using unparameterized types when compiling with -Xline:rawtypes
.
Note that this change is source-code incompatible with clients that specify a type parameter for BasicItem
(eg BasicItem<?>
), but the fix is as easy as removing the <?>
part.
comment:8 by , 10 years ago
comment:9 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:10 by , 10 years ago
(In [6913]) References #1939: Fix javac compiler warnings
Remove @SuppressWarnings({"varargs"})
and removed 'varargs' check from -Xlint
since this type of warning should already be handled better with the @SafeVarargs
annotation. In particular this gets rid of Eclipse complaining about "varargs" not being a valid parameter for @SuppressWarnings
.
(In [6869]) References #1939: Fix javac compiler warnings
Remove reference to non-existing (and unused) 'activation.jar' inside MANIFEST.MF.