java: unneeded instance check
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Thu, 9 Oct 2014 17:17:46 +0000 (19:17 +0200)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Thu, 9 Oct 2014 17:17:46 +0000 (19:17 +0200)
java/java-psi-impl/src/com/intellij/psi/impl/source/JavaLightStubBuilder.java

index 3413fda3a3fe2b92c01cff21b22d9be8f538f1d6..a532f49fddc1144cf5e21f0d7a9147b4fd0f2e6b 100644 (file)
@@ -57,7 +57,7 @@ public class JavaLightStubBuilder extends LightStubBuilder {
 
     if (checkByTypes(parentType, nodeType)) return true;
 
-    if (nodeType == JavaElementType.CODE_BLOCK && node instanceof TreeElement) {
+    if (nodeType == JavaElementType.CODE_BLOCK) {
       CodeBlockVisitor visitor = new CodeBlockVisitor();
       ((TreeElement)node).acceptTree(visitor);
       return visitor.result;
@@ -73,7 +73,7 @@ public class JavaLightStubBuilder extends LightStubBuilder {
 
     if (checkByTypes(parentType, nodeType)) return true;
 
-    if (nodeType == JavaElementType.CODE_BLOCK && node instanceof LighterLazyParseableNode) {
+    if (nodeType == JavaElementType.CODE_BLOCK) {
       CodeBlockVisitor visitor = new CodeBlockVisitor();
       ((LighterLazyParseableNode)node).accept(visitor);
       return visitor.result;