diff --git a/org.eclipse.xtext.xbase.ui/src/org/eclipse/xtext/xbase/ui/validation/XbaseUIValidator.java b/org.eclipse.xtext.xbase.ui/src/org/eclipse/xtext/xbase/ui/validation/XbaseUIValidator.java index a20a1667c13..173b2c7dd2e 100644 --- a/org.eclipse.xtext.xbase.ui/src/org/eclipse/xtext/xbase/ui/validation/XbaseUIValidator.java +++ b/org.eclipse.xtext.xbase.ui/src/org/eclipse/xtext/xbase/ui/validation/XbaseUIValidator.java @@ -238,10 +238,10 @@ protected IClasspathEntry getResolvedClasspathEntry(IJavaProject javaProject, /* return result; } - final Version jdtCoreVersion = JavaCore.getPlugin().getBundle().getVersion(); + protected final boolean isJdtCoreVersionAtLeast3390 = JavaCore.getPlugin().getBundle().getVersion().compareTo(new Version(3, 39, 0)) >= 0; protected Map getRootPathToResolvedEntries(PerProjectInfo info) { - if (jdtCoreVersion.compareTo(new Version(3, 39, 0)) >= 0) { + if (isJdtCoreVersionAtLeast3390) { try { Method m = PerProjectInfo.class.getDeclaredMethod("getRootPathToResolvedEntries"); @SuppressWarnings("unchecked")