EA-26528 - NPE: InplaceIntroduceFieldPopup$FieldInplaceIntroducer$3.run

This commit is contained in:
anna
2011-04-05 15:45:48 +02:00
parent 7195c2dd80
commit cd587a0217
2 changed files with 4 additions and 4 deletions
@@ -418,11 +418,11 @@ public class InplaceIntroduceConstantPopup {
}
}
if (myAnchorIdxIfAll != -1) {
if (myAnchorIdxIfAll != -1 && myOccurrences[myAnchorIdxIfAll] != null) {
myAnchorElementIfAll = myOccurrences[myAnchorIdxIfAll].getParent();
}
if (myAnchorIdx != -1) {
if (myAnchorIdx != -1 && myOccurrences[myAnchorIdx] != null) {
myAnchorElement = myOccurrences[myAnchorIdx].getParent();
}
myOccurrenceMarkers = null;
@@ -335,8 +335,8 @@ public class InplaceIntroduceFieldPopup {
final BaseExpressionToFieldHandler.ConvertToFieldRunnable convertToFieldRunnable =
new BaseExpressionToFieldHandler.ConvertToFieldRunnable(myInitializerExpression, settings, settings.getForcedType(),
myOccurrences, myOccurenceManager,
myAnchorIdxIfAll != -1? myOccurrences[myAnchorIdxIfAll].getParent() : myAnchorElementIfAll,
myAnchorIdx != -1 ? myOccurrences[myAnchorIdx].getParent() : myAnchorElement, myEditor,
myAnchorIdxIfAll != -1 && myOccurrences[myAnchorIdxIfAll] != null ? myOccurrences[myAnchorIdxIfAll].getParent() : myAnchorElementIfAll,
myAnchorIdx != -1 && myOccurrences[myAnchorIdx] != null ? myOccurrences[myAnchorIdx].getParent() : myAnchorElement, myEditor,
myParentClass);
convertToFieldRunnable.run();
}