mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
StreamToLoopInspection: resolveReferencedClass used (IDEA-CR-18746)
This commit is contained in:
+2
-3
@@ -182,9 +182,8 @@ public class StreamToLoopInspection extends BaseJavaBatchLocalInspectionTool {
|
||||
return false;
|
||||
}
|
||||
if(elementType instanceof PsiImmediateClassType) {
|
||||
PsiType typeFromText =
|
||||
JavaPsiFacade.getElementFactory(context.getProject()).createTypeFromText(elementType.getCanonicalText(), context);
|
||||
if(!(typeFromText instanceof PsiClassType) || ((PsiClassType)typeFromText).resolve() == null) {
|
||||
PsiResolveHelper helper = PsiResolveHelper.SERVICE.getInstance(context.getProject());
|
||||
if (helper.resolveReferencedClass(elementType.getCanonicalText(), context) == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user