$ mvn compile
(Omission)
[WARNING] /Users/az/app/src/main/java/MyApp.java: /Users/az/app/src/main/java/MyApp.Java operations are unchecked or unsafe.
[WARNING] /Users/az/app/src/main/java/MyApp.java:Detail is,-Xlint:Recompile with the unchecked option.
Add the Compiler Plugin settings to the plugins element of pom.xml as follows.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<compilerArgs>
<arg>-Xlint:unchecked</arg>
</compilerArgs>
</configuration>
</plugin>
Now the specific warning content will be displayed.
[WARNING] /Users/az/app/src/main/java/MyApp.java:[50,17]raw type java.util.Put as a member of Map(K,V)It is an unchecked call to
[WARNING] /Users/az/app/src/main/java/MyApp.java:[53,12]Unchecked conversion
Expected value: java.util.Map<java.lang.String,java.lang.Object>
Detected value: java.util.Map
Recommended Posts