If you switch on an enum, and neither cover all cases nor provide a default, it is useful to get a compiler warning. Other answers on this site have suggested that javac should provide such a warning.
I'm using Maven, and have added the following to pom.xml in an attempt to enable all warnings:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
But the compiler is still silent about nonexhaustive switch statements in my code. Is there some other flag I can set, to enable such warnings?