mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
EA-33721 (NPE: CastConflictsWithInstanceofInspection$ReplaceFix.doFix)
This commit is contained in:
+4
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2011 Dave Griffith, Bas Leijdekkers
|
||||
* Copyright 2003-2012 Dave Griffith, Bas Leijdekkers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -183,6 +183,9 @@ public class CastConflictsWithInstanceofInspection extends BaseInspection {
|
||||
}
|
||||
final PsiInstanceOfExpression conflictingInstanceof =
|
||||
InstanceOfUtils.getConflictingInstanceof(castTypeElement.getType(), reference, element);
|
||||
if (conflictingInstanceof == null) {
|
||||
return;
|
||||
}
|
||||
final PsiTypeElement instanceofTypeElement = conflictingInstanceof.getCheckType();
|
||||
if (instanceofTypeElement == null) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user