mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-218805 NullPointerException when find cause quick fix applied
GitOrigin-RevId: fcac9cd13e2f714bb6bfb0699e825bc5a190d68a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cf40057404
commit
ed7f52f85b
+4
-3
@@ -927,9 +927,10 @@ public class TrackingRunner extends StandardDataFlowRunner {
|
||||
else {
|
||||
continue;
|
||||
}
|
||||
return Arrays.asList(getFactory().getRelationFactory().createRelation(left, type, right),
|
||||
getFactory().getRelationFactory()
|
||||
.createRelation(actualVar, actualRelation.myRelationType, actualRelation.myCounterpart));
|
||||
DfaRelationValue.Factory factory = getFactory().getRelationFactory();
|
||||
DfaRelationValue rel1 = factory.createRelation(left, type, right);
|
||||
DfaRelationValue rel2 = factory.createRelation(actualVar, actualRelation.myRelationType, actualRelation.myCounterpart);
|
||||
return StreamEx.of(rel1, rel2).nonNull().toImmutableList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
Value is always false (code == ReturnStatus.NOT_FOUND; line#8)
|
||||
It's known that 'code != ReturnStatus.NOT_FOUND' from line #7 (code != ReturnStatus.SUCCESS; line#7)
|
||||
*/
|
||||
class SampleClazz {
|
||||
public void foo(ReturnStatus code) {
|
||||
if (code != ReturnStatus.SUCCESS) {
|
||||
} else if (<selection>code == ReturnStatus.NOT_FOUND</selection>) {
|
||||
}
|
||||
}
|
||||
|
||||
enum ReturnStatus {
|
||||
SUCCESS, NOT_FOUND
|
||||
}
|
||||
}
|
||||
+1
@@ -178,4 +178,5 @@ public class DataFlowInspectionTrackerTest extends LightJavaCodeInsightFixtureTe
|
||||
public void testFinalFieldInitialized() { doTest(); }
|
||||
public void testFinalFieldInitializedCtor() { doTest(); }
|
||||
public void testEqualsNull() { doTest(); }
|
||||
public void testEnumCompare() { doTest(); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user