Skip to content

Commit a81043c

Browse files
authored
this.blockingNeutral can be null
I think changing .equals() to == will fix a possible crash at this location. We know that pBlocking is not null because the preceding line would have thrown IllegalStateException.
1 parent 5669f9b commit a81043c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/bwem/ChokePointImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public void onBlockingNeutralDestroyed(final Neutral pBlocking) {
243243
throw new IllegalStateException();
244244
}
245245

246-
if (this.blockingNeutral.equals(pBlocking)) {
246+
if (this.blockingNeutral == pBlocking) {
247247
// Ensures that in the case where several neutrals are stacked, blockingNeutral points to the
248248
// bottom one:
249249
this.blockingNeutral =

0 commit comments

Comments
 (0)