| 1. |
Why Are Compile-time Warnings Suppressed? You'll Notice That `build.gradle` Includes The Following Line? |
|
Answer» [compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none'] This tells GRADLE to suppress all warnings during compilation. The REASON for this is that the framework currently has many warnings, most of which are related to generics usage -- particularly RAW type warnings -- e.g. using Class instead of Class<?>. This is an artifact switching to Java 5 in Spring 3. As with the Javadoc warnings mentioned above, committers are encouraged to fix these warnings whenever POSSIBLE. Once the bulk of them are eliminated, we can switch to -Xlint:all. In the meantime, it's just creates unnecessary noise in the build output. [compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none'] This tells Gradle to suppress all warnings during compilation. The reason for this is that the framework currently has many warnings, most of which are related to generics usage -- particularly raw type warnings -- e.g. using Class instead of Class<?>. This is an artifact switching to Java 5 in Spring 3. As with the Javadoc warnings mentioned above, committers are encouraged to fix these warnings whenever possible. Once the bulk of them are eliminated, we can switch to -Xlint:all. In the meantime, it's just creates unnecessary noise in the build output. |
|