properties: filter nulls while checking of incomplete properties
authorDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Wed, 10 Aug 2016 15:27:29 +0000 (18:27 +0300)
committerDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Wed, 10 Aug 2016 15:28:07 +0000 (18:28 +0300)
plugins/properties/src/com/intellij/lang/properties/editor/inspections/incomplete/IncompletePropertyInspection.java

index e2427201fdd5e2ee7260c3e9cfacbf2830ec97e4..abf7037a44bc76c2bfb0ad04b598f1eb1945a783 100644 (file)
@@ -148,7 +148,7 @@ public class IncompletePropertyInspection extends LocalInspectionTool implements
   }
 
   public boolean isPropertyComplete(final String key, final ResourceBundle resourceBundle) {
-    return isPropertyComplete(resourceBundle.getPropertiesFiles().stream().map(f -> f.findPropertyByKey(key)).toArray(IProperty[]::new), resourceBundle);
+    return isPropertyComplete(resourceBundle.getPropertiesFiles().stream().map(f -> f.findPropertyByKey(key)).filter(Objects::nonNull).toArray(IProperty[]::new), resourceBundle);
   }
 
   private boolean isPropertyComplete(final IProperty[] properties, final ResourceBundle resourceBundle) {