commit | 530d24dc4b78515d46c914d8f9167dd995e74ad6 | [log] [tgz] |
---|---|---|
author | Jay Arthanareeswaran <jarthana@in.ibm.com> | Thu Nov 21 16:07:35 2019 +0530 |
committer | Jay Arthanareeswaran <jarthana@in.ibm.com> | Mon Nov 25 23:15:53 2019 -0500 |
tree | c18a96855c9ddddb47c79056c44bdf6027256077 | |
parent | 7dcb0d41439f79bfdc0275c722c690fad4542dd5 [diff] |
Bug 553305 - Make Java9ElementsTests future-proof Change-Id: I0dc02f214f9f851d8d5086e77d0c719a4d8d4727 Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
diff --git a/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar b/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar index c0e4619..9cc48c8 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 afbf62b..61e8434 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 @@ 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 "*".