aboutsummaryrefslogtreecommitdiff
path: root/src/utils/lombok/eclipse
diff options
context:
space:
mode:
authorMichael Ernst <mernst@cs.washington.edu>2021-12-07 11:16:11 -0800
committerMichael Ernst <mernst@cs.washington.edu>2021-12-07 11:16:11 -0800
commit3f5e4a2819d2f03d634a06861ff5487af320b719 (patch)
treeba9ab7ba2f582bb179624e2bb3f717bea5d9a421 /src/utils/lombok/eclipse
parent0b4cc60c2367845ebc362e4b254f9e96a66d53c3 (diff)
parentd3b763f9dab4a46e88ff10bc2132fb6f12fda639 (diff)
downloadlombok-3f5e4a2819d2f03d634a06861ff5487af320b719.tar.gz
lombok-3f5e4a2819d2f03d634a06861ff5487af320b719.tar.bz2
lombok-3f5e4a2819d2f03d634a06861ff5487af320b719.zip
Merge ../lombok-branch-master into nullness-annotations
Diffstat (limited to 'src/utils/lombok/eclipse')
-rw-r--r--src/utils/lombok/eclipse/Eclipse.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils/lombok/eclipse/Eclipse.java b/src/utils/lombok/eclipse/Eclipse.java
index 8af481b9..0f42ddc6 100644
--- a/src/utils/lombok/eclipse/Eclipse.java
+++ b/src/utils/lombok/eclipse/Eclipse.java
@@ -224,8 +224,11 @@ public class Eclipse {
int highestVersionSoFar = 0;
for (Field f : ClassFileConstants.class.getDeclaredFields()) {
try {
- if (f.getName().startsWith("JDK1_")) {
- int thisVersion = Integer.parseInt(f.getName().substring("JDK1_".length()));
+ if (f.getName().startsWith("JDK")) {
+ String versionString = f.getName().substring("JDK".length());
+ if (versionString.startsWith("1_")) versionString = versionString.substring("1_".length());
+
+ int thisVersion = Integer.parseInt(versionString);
if (thisVersion > highestVersionSoFar) {
highestVersionSoFar = thisVersion;
latestEcjCompilerVersionConstantCached = (Long) f.get(null);