`mvn spotless:apply` no longer works on JRE 8
acmiyaguchi opened this issue · comments
Anthony Miyaguchi commented
Line 48 in c531332
[INFO] --- spotless-maven-plugin:2.5.0:apply (default-cli) @ ingestion-beam ---
Nov 02, 2020 6:46:20 PM com.diffplug.spotless.FormatExceptionPolicyLegacy error
SEVERE: Step 'removeUnusedImports' found problem in 'src/main/java/com/mozilla/telemetry/decoder/DecryptPioneerPayloads.java':
You are running Spotless on JRE 8, which limits you to google-java-format 1.7
If you upgrade your build JVM to 11+, then you can use google-java-format 1.9, which may have fixed this problem.
java.lang.Exception: You are running Spotless on JRE 8, which limits you to google-java-format 1.7
If you upgrade your build JVM to 11+, then you can use google-java-format 1.9, which may have fixed this problem.
Jeff Klukas commented
cc @relud - Would you be able to look into fixing this? I suspect it's because we pull in the spotless config from beam's repo and they may have upgraded their setup to JRE 11.
Anthony Miyaguchi commented
This was an issue on my part -- I upgraded to maven:3-jdk-11
and reran spotless:apply
and ran into the same error. This seems to be the issue when you forget the type declaration within a function:
private static String resolveInvalidNamespace(schemaNamespace) {