java: correct recognition of Java 1.1 class files
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Tue, 14 Oct 2014 14:38:00 +0000 (16:38 +0200)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Tue, 14 Oct 2014 14:38:00 +0000 (16:38 +0200)
java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsParsingUtil.java

index 89e3881bb476781d349948920cd616985c28c383..6f7be25929904db40a972ea3962e9776a362401c 100644 (file)
@@ -173,9 +173,10 @@ public class ClsParsingUtil {
     return StringUtil.isJavaIdentifier(identifier) && !JavaLexer.isKeyword(identifier, level);
   }
 
-  public static LanguageLevel getLanguageLevelByVersion(final int version) {
-    switch (version) {
+  public static LanguageLevel getLanguageLevelByVersion(int major) {
+    switch (major) {
       case Opcodes.V1_1:
+      case 45:  // other variant of 1.1
       case Opcodes.V1_2:
       case Opcodes.V1_3:
         return LanguageLevel.JDK_1_3;