mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] correct Java version in .class file editor notification (IDEA-156371)
This commit is contained in:
+3
-1
@@ -175,7 +175,9 @@ public class AttachSourcesNotificationProvider extends EditorNotifications.Provi
|
||||
int major = stream.readUnsignedShort();
|
||||
StringBuilder info = new StringBuilder().append("bytecode version: ").append(major).append('.').append(minor);
|
||||
LanguageLevel level = ClsParsingUtil.getLanguageLevelByVersion(major);
|
||||
if (level != null) info.append(" (").append(level.getName()).append(')');
|
||||
if (level != null) {
|
||||
info.append(" (").append(level == LanguageLevel.JDK_1_3 ? level.getName() + " or older" : level.getName()).append(')');
|
||||
}
|
||||
return info.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,6 +200,9 @@ public class ClsParsingUtil {
|
||||
case Opcodes.V1_8:
|
||||
return LanguageLevel.JDK_1_8;
|
||||
|
||||
case Opcodes.V1_8 + 1:
|
||||
return LanguageLevel.JDK_1_9;
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user