Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Arthanareeswaran2019-11-21 10:37:35 +0000
committerJay Arthanareeswaran2019-11-26 04:15:53 +0000
commit530d24dc4b78515d46c914d8f9167dd995e74ad6 (patch)
treec18a96855c9ddddb47c79056c44bdf6027256077
parent7dcb0d41439f79bfdc0275c722c690fad4542dd5 (diff)
downloadeclipse.jdt.core-530d24dc4b78515d46c914d8f9167dd995e74ad6.tar.gz
eclipse.jdt.core-530d24dc4b78515d46c914d8f9167dd995e74ad6.tar.xz
eclipse.jdt.core-530d24dc4b78515d46c914d8f9167dd995e74ad6.zip
Bug 553305 - Make Java9ElementsTests future-proofI20191126-2315I20191126-1800I20191126-0600
Change-Id: I0dc02f214f9f851d8d5086e77d0c719a4d8d4727 Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
-rw-r--r--org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jarbin267940 -> 267785 bytes
-rw-r--r--org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java9ElementProcessor.java11
2 files changed, 8 insertions, 3 deletions
diff --git a/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar b/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar
index c0e46191a6..9cc48c8cac 100644
--- a/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar
+++ b/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar
Binary files differ
diff --git a/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java9ElementProcessor.java b/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java9ElementProcessor.java
index afbf62b9fb..61e8434ebb 100644
--- a/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java9ElementProcessor.java
+++ b/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java9ElementProcessor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017, 2018 IBM Corporation.
+ * Copyright (c) 2017, 2019 IBM Corporation.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -82,8 +82,13 @@ public class Java9ElementProcessor extends BaseProcessor {
this.isJre10 = true;
} else if (property.equals(CompilerOptions.VERSION_11)) {
this.isJre11 = true;
- } else if (property.equals(CompilerOptions.VERSION_12)) {
- this.isJre12 = true;
+ } else {
+ char c = '.';
+ if (property.indexOf(c) == -1) {
+ int ver12 = Integer.parseInt(CompilerOptions.VERSION_12);
+ int current = Integer.parseInt(property);
+ if (current >= ver12) this.isJre12 = true;
+ }
}
}
// Always return false from this processor, because it supports "*".

Back to the top