http://ea.jetbrains.com/browser/ea_problems/17172
authorMaxim Shafirov <max@jetbrains.com>
Thu, 26 Nov 2009 19:09:35 +0000 (22:09 +0300)
committerMaxim Shafirov <max@jetbrains.com>
Fri, 27 Nov 2009 11:46:39 +0000 (14:46 +0300)
java/java-impl/src/com/intellij/psi/impl/compiled/ClsFileImpl.java

index 2cdded1a9a67dd9afb546901f582aa9c300ea55e..360d33225dd1c6cf784392655d2346ddd9879ee6 100644 (file)
@@ -181,11 +181,8 @@ public class ClsFileImpl extends ClsRepositoryPsiElement<PsiClassHolderFileStub>
 
   @NotNull
   public LanguageLevel getLanguageLevel() {
-    return getClassStub().getLanguageLevel();
-  }
-
-  private PsiClassStub<?> getClassStub() {
-    return (PsiClassStub)getStub().getChildrenStubs().get(0);
+    final List stubs = getStub().getChildrenStubs();
+    return stubs.size() > 0 ? ((PsiClassStub<?>)stubs.get(0)).getLanguageLevel() : LanguageLevel.HIGHEST;
   }
 
   public PsiElement setName(@NotNull String name) throws IncorrectOperationException {