From e6447a91d6fd8c08cf4ae2ffd2e1c362fd914eb7 Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Fri, 9 Jun 2017 15:25:47 +0300 Subject: [PATCH] EA-102221 --- plugins/devkit/src/internal/IconsGeneratedSourcesFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/devkit/src/internal/IconsGeneratedSourcesFilter.java b/plugins/devkit/src/internal/IconsGeneratedSourcesFilter.java index cce5380d179f..8b065b5b1b2c 100644 --- a/plugins/devkit/src/internal/IconsGeneratedSourcesFilter.java +++ b/plugins/devkit/src/internal/IconsGeneratedSourcesFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ public class IconsGeneratedSourcesFilter extends GeneratedSourcesFilter { PsiFile psiFile = PsiManager.getInstance(project).findFile(file); if (psiFile instanceof PsiJavaFile) { for (PsiClass aClass : ((PsiJavaFile)psiFile).getClasses()) { - if (aClass.hasModifierProperty(PsiModifier.PUBLIC)) { + if (aClass.isValid() && aClass.hasModifierProperty(PsiModifier.PUBLIC)) { PsiDocComment comment = aClass.getDocComment(); return comment != null && comment.getText().contains("run build/scripts/icons.gant instead"); }