]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 27 Nov 2015 09:09:10 +0000 (10:09 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 27 Nov 2015 09:09:10 +0000 (10:09 +0100)
server/sonar-search/src/main/java/org/sonar/search/script/ListUpdate.java

index d93ae29b515aaf293a30bd45154b02e6d2a4fd76..aad18588ed8c2b7eaa5107939721b4504abce5c1 100644 (file)
@@ -19,6 +19,7 @@
  */
 package org.sonar.search.script;
 
+import java.util.Objects;
 import org.elasticsearch.common.Nullable;
 import org.elasticsearch.common.xcontent.support.XContentMapValues;
 import org.elasticsearch.script.AbstractExecutableScript;
@@ -125,7 +126,8 @@ public class ListUpdate extends AbstractExecutableScript {
             break;
           }
         }
-        if (target != null) {
+        if (target != null && items != null) {
+
           items.remove(target);
         }