You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2021/05/13 02:56:27 UTC

[sling-org-apache-sling-app-cms] branch master updated: Minor - removing bug flagged by Sonarqube

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git


The following commit(s) were added to refs/heads/master by this push:
     new dce337f  Minor - removing bug flagged by Sonarqube
dce337f is described below

commit dce337f76e48d1e2e4374ce70306e171519ae238
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Wed May 12 22:55:11 2021 -0400

    Minor - removing bug flagged by Sonarqube
---
 .../sling/cms/core/internal/operations/BulkReplaceOperation.java       | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/operations/BulkReplaceOperation.java b/core/src/main/java/org/apache/sling/cms/core/internal/operations/BulkReplaceOperation.java
index eb41723..c568625 100644
--- a/core/src/main/java/org/apache/sling/cms/core/internal/operations/BulkReplaceOperation.java
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/operations/BulkReplaceOperation.java
@@ -145,7 +145,6 @@ public class BulkReplaceOperation implements PostOperation {
         }
     }
 
-    @SuppressWarnings("unlikely-arg-type")
     private boolean updateProperty(Resource resource, Pattern rfind, String find, String replace,
             ModifiableValueMap properties, boolean updated, Entry<String, Object> entry) {
         log.trace("Checking property {}@{}", resource.getPath(), entry.getKey());
@@ -165,7 +164,7 @@ public class BulkReplaceOperation implements PostOperation {
                     updated = true;
                 }
             }
-        } else if (properties.get(entry) instanceof String[]) {
+        } else if (properties.get(entry.getKey()) instanceof String[]) {
             log.trace("Found array value");
             boolean arrUpdated = false;
             String[] v = (String[]) entry.getValue();