This is an automated email from the ASF dual-hosted git repository.
penghui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 8659512 [build] Enable detailed Java compiler warnings (#9780)
8659512 is described below
commit 8659512910216f3517ce39ce71c6e3bb5eda9380
Author: Lari Hotari <[email protected]>
AuthorDate: Thu Mar 4 02:25:42 2021 +0200
[build] Enable detailed Java compiler warnings (#9780)
### Motivation
- In many projects there's a convention that Java compiler warnings should
be addressed by suppressing individual warnings or fixing the code.
- To fix unchecked/unsafe warnings, it is necessary to see the detailed
warning. This can be seen when there is `-Xlint:unchecked` or `-Xlint:all` in
compiler arguments
### Modifications
Add `-Xlint:all -Xlint:-options -Xlint:-serial -Xlint:-classfile
-Xlint:-processing` to the configuration of `maven-compiler-plugin`. This
enables all javac lint warnings except 'options', 'serial' and 'classfile'.
---
pom.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/pom.xml b/pom.xml
index a1acb29..d434481 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1122,6 +1122,12 @@ flexible messaging model and an intuitive client
API.</description>
</annotationProcessorPaths>
<compilerArgs>
<arg>-parameters</arg>
+ <!-- enable 'all' lint warnings with some exclusions -->
+ <arg>-Xlint:all</arg>
+ <arg>-Xlint:-options</arg>
+ <arg>-Xlint:-serial</arg>
+ <arg>-Xlint:-classfile</arg>
+ <arg>-Xlint:-processing</arg>
</compilerArgs>
</configuration>
</plugin>