Fix incorrect check for class version against max supported version to set at target version for javac
@@ -122,7 +122,7 @@ public class JavaEditorPane extends EditorPane<JavaErrorHandling, JavaContextHan
JavacTargetVersion maxSupportedVersion = JavacTargetVersion.getMaxJavacSupport();
if (minSupportedVersion.ordinal() > classVersion.ordinal())
classVersion = minSupportedVersion;
- if (maxSupportedVersion.ordinal() > classVersion.ordinal())
+ if (maxSupportedVersion.ordinal() < classVersion.ordinal())
classVersion = maxSupportedVersion;
javac.options().setTarget(classVersion);
javac.setCompileListener(getErrorHandler());
