EA-91031 - NPE: EmptyMethodInspection$DeleteMethodQuickFix.applyFix

This commit is contained in:
Anna.Kozlova
2016-11-02 17:02:29 +01:00
parent 8067101fcf
commit dbb7e3cd72
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -377,7 +377,7 @@ public class EmptyMethodInspection extends GlobalJavaBatchInspectionTool {
@Nullable final Runnable refreshViews) {
for (CommonProblemDescriptor descriptor : descriptors) {
RefElement refElement = (RefElement)myProcessor.getElement(descriptor);
if (refElement.isValid() && refElement instanceof RefMethod) {
if (refElement instanceof RefMethod && refElement.isValid()) {
RefMethod refMethod = (RefMethod)refElement;
if (myNeedToDeleteHierarchy) {
deleteHierarchy(refMethod, psiElementsToIgnore);