properties: filter nulls while checking of incomplete properties
[idea/community.git] / 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) {