Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Bump ECJ so that sources can be compiled with Java 8 target
Browse files Browse the repository at this point in the history
  • Loading branch information
jwgmeligmeyling committed Dec 28, 2020
1 parent 67c27d2 commit 276efe4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<properties>
<commons.collections.version>4.01</commons.collections.version>
<commons.lang.version>3.0.1</commons.lang.version>
<ecj.version>4.3.1</ecj.version>
<ecj.version>4.6.1</ecj.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ public class ECJEvaluatorFactory extends AbstractEvaluatorFactory {

public static CompilerOptions getDefaultCompilerOptions() {
String javaSpecVersion = System.getProperty("java.specification.version");
if (javaSpecVersion.equals("1.8") || (javaSpecVersion.matches("\\d+") && Integer.parseInt(javaSpecVersion) >= 9)) {
javaSpecVersion = "1.7";
}
Map<String, Object> settings = new HashMap<>();
Map<String, String> settings = new HashMap<>();
settings.put(CompilerOptions.OPTION_Source, javaSpecVersion);
settings.put(CompilerOptions.OPTION_TargetPlatform, javaSpecVersion);
settings.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.IGNORE);
Expand Down

0 comments on commit 276efe4

Please sign in to comment.