Skip to content

Commit

Permalink
Support Java 8 compat mode
Browse files Browse the repository at this point in the history
  • Loading branch information
timowestnosto committed Oct 27, 2015
1 parent 847cf0c commit 591045f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions framework/src/play/classloading/ApplicationCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,17 @@ public ApplicationCompiler(ApplicationClasses applicationClasses) {
javaVersion = CompilerOptions.VERSION_1_6;
} else if (System.getProperty("java.version").startsWith("1.7")) {
javaVersion = CompilerOptions.VERSION_1_7;
} else if (System.getProperty("java.version").startsWith("1.8")) {
javaVersion = CompilerOptions.VERSION_1_8;
}
if("1.5".equals(Play.configuration.get("java.source"))) {
javaVersion = CompilerOptions.VERSION_1_5;
} else if("1.6".equals(Play.configuration.get("java.source"))) {
javaVersion = CompilerOptions.VERSION_1_6;
} else if("1.7".equals(Play.configuration.get("java.source"))) {
javaVersion = CompilerOptions.VERSION_1_7;
} else if("1.8".equals(Play.configuration.get("java.source"))) {
javaVersion = CompilerOptions.VERSION_1_8;
}
this.settings.put(CompilerOptions.OPTION_Source, javaVersion);
this.settings.put(CompilerOptions.OPTION_TargetPlatform, javaVersion);
Expand Down Expand Up @@ -113,6 +117,12 @@ public char[] getMainTypeName() {
public char[][] getPackageName() {
return packageName;
}

@Override
public boolean ignoreOptionalProblems() {
// TODO Auto-generated method stub
return false;
}
}

/**
Expand Down

0 comments on commit 591045f

Please sign in to comment.