aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Bricon2018-07-31 15:05:55 -0400
committerFred Bricon2018-07-31 15:05:55 -0400
commit1a9813ac6e50b78b731e2e4857a71e8434b82a98 (patch)
treeb25c985e8b7d54284a515821824e86657c5c253b
parent600ad49ffdb5601d688f109231f0c3df951e7207 (diff)
downloadm2e-core-1a9813ac6e50b78b731e2e4857a71e8434b82a98.tar.gz
m2e-core-1a9813ac6e50b78b731e2e4857a71e8434b82a98.tar.xz
m2e-core-1a9813ac6e50b78b731e2e4857a71e8434b82a98.zip
537544 : support m-c-p source/target 1.9 and 1.10
Change-Id: I807b45e33fbed4112697130b8705ce5f5197c125 Signed-off-by: Fred Bricon <fbricon@gmail.com>
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
index 4ccce8f8..7b031a45 100644
--- a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
+++ b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
@@ -97,9 +97,10 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
static {
- List<String> sources = new ArrayList<>(Arrays.asList("1.1,1.2,1.3,1.4,1.5,5,1.6,6,1.7,7,1.8,8,9".split(","))); //$NON-NLS-1$ //$NON-NLS-2$
+ List<String> sources = new ArrayList<>(Arrays.asList("1.1,1.2,1.3,1.4,1.5,5,1.6,6,1.7,7,1.8,8,1.9,9".split(","))); //$NON-NLS-1$ //$NON-NLS-2$
- List<String> targets = new ArrayList<>(Arrays.asList("1.1,1.2,1.3,1.4,jsr14,1.5,5,1.6,6,1.7,7,1.8,8,9".split(","))); //$NON-NLS-1$ //$NON-NLS-2$
+ List<String> targets = new ArrayList<>(
+ Arrays.asList("1.1,1.2,1.3,1.4,jsr14,1.5,5,1.6,6,1.7,7,1.8,8,1.9,9".split(","))); //$NON-NLS-1$ //$NON-NLS-2$
List<String> releases = new ArrayList<>(Arrays.asList("6,7,8,9".split(","))); //$NON-NLS-1$ //$NON-NLS-2$
@@ -116,9 +117,13 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
IExecutionEnvironment javaSe10 = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment("JavaSE-10");//$NON-NLS-1$
if(javaSe10 != null) {
- String level = "10";//$NON-NLS-1$
+ String level = "10";
+ //add support for 1.10, see https://bugs.java.com/view_bug.do?bug_id=8180865
+ String level1 = "1" + level;//$NON-NLS-1$
+ sources.add(level1);
+ sources.add(level);
+ targets.add(level1);
sources.add(level);
- targets.add(level);
releases.add(level);
ENVIRONMENTS.put(level, javaSe10.getId());
}
@@ -635,6 +640,10 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
private String sanitizeJavaVersion(String version) {
switch(version) {
+ case "1.9":
+ case "1.10":
+ version = version.substring(2);
+ break;
case "5":
case "6":
case "7":