Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Arthanareeswaran2015-10-28 08:08:27 +0000
committerJay Arthanareeswaran2015-10-28 08:59:01 +0000
commitc7a8b7fd1ce23a51c71adbc13895e1e7353a4cf1 (patch)
tree3c498768aceb6761aa954b992bd205385aa3f8ff
parent9b7b19bdcdbcea831580c60277f290356f5e2da7 (diff)
downloadeclipse.jdt.core-c7a8b7fd1ce23a51c71adbc13895e1e7353a4cf1.tar.gz
eclipse.jdt.core-c7a8b7fd1ce23a51c71adbc13895e1e7353a4cf1.tar.xz
eclipse.jdt.core-c7a8b7fd1ce23a51c71adbc13895e1e7353a4cf1.zip
Bug 480835 - Some clients pass null as version string, handle it.I20151029-1100I20151028-2000I20151028-0800
-rw-r--r--org.eclipse.jdt.compiler.apt/forceQualifierUpdate.txt1
-rw-r--r--org.eclipse.jdt.core.tests.builder/forceQualifierUpdate.txt2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java2
3 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jdt.compiler.apt/forceQualifierUpdate.txt b/org.eclipse.jdt.compiler.apt/forceQualifierUpdate.txt
index 585e3c1bc1..bcd0e06f7f 100644
--- a/org.eclipse.jdt.compiler.apt/forceQualifierUpdate.txt
+++ b/org.eclipse.jdt.compiler.apt/forceQualifierUpdate.txt
@@ -1,2 +1,3 @@
# To force a version qualifier update, add the bug here
Bug 441790 - AnnotationValue.toString is creating incorrect and truncated text that cannot be used in source code
+Bug 480835 - Failures in build due to changes not being picked up by tests
diff --git a/org.eclipse.jdt.core.tests.builder/forceQualifierUpdate.txt b/org.eclipse.jdt.core.tests.builder/forceQualifierUpdate.txt
new file mode 100644
index 0000000000..073841225f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.builder/forceQualifierUpdate.txt
@@ -0,0 +1,2 @@
+# To force a version qualifier update, add the bug here
+Bug 480835 - Failures in build due to changes not being picked up by tests
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
index 09e7892c9b..1b006ee54a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
@@ -736,7 +736,7 @@ public class CompilerOptions {
public static long versionToJdkLevel(String versionID) {
String version = versionID;
// verification is optimized for all versions with same length and same "1." prefix
- if (version.length() == 3 && version.charAt(0) == '1' && version.charAt(1) == '.') {
+ if (version != null && version.length() == 3 && version.charAt(0) == '1' && version.charAt(1) == '.') {
switch (version.charAt(2)) {
case '1':
return ClassFileConstants.JDK1_1;

Back to the top