EA-35948 (check before cast)

This commit is contained in:
Roman Shevchenko
2012-05-03 17:26:44 +02:00
parent f00ced816f
commit 8fef46c346
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -239,7 +239,7 @@ public abstract class PsiJavaFileBaseImpl extends PsiFileImpl implements PsiJava
@Override
public void handleEvent(final Event event, final Object associated) {
if (JavaScopeProcessorEvent.SET_CURRENT_FILE_CONTEXT.equals(event)) {
if (JavaScopeProcessorEvent.SET_CURRENT_FILE_CONTEXT.equals(event) && associated instanceof PsiImportStaticStatement) {
final PsiImportStaticStatement importStaticStatement = (PsiImportStaticStatement)associated;
myIsProcessingOnDemand = importStaticStatement.isOnDemand();
if (!myIsProcessingOnDemand) {