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

rombert pushed a commit to branch issue/SLING-12029
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-extension-content.git

commit e984fa307b9f08faff6111cbb761a38dc9f2905b
Author: Robert Munteanu <romb...@apache.org>
AuthorDate: Wed Sep 20 11:09:13 2023 +0200

    trivial: code cleanups
---
 .../org/apache/sling/feature/extension/content/ContentHandler.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java 
b/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
index eaaffbd..c5dc8eb 100644
--- 
a/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
+++ 
b/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
@@ -19,6 +19,7 @@ package org.apache.sling.feature.extension.content;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.net.URL;
+import java.nio.charset.StandardCharsets;
 import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -113,12 +114,11 @@ public class ContentHandler implements ExtensionHandler {
             }
             List<String> executionPlans = new ArrayList<>();
             Set<PackageId> satisfiedPackages = new HashSet<>();
-            for (Object key : orderedArtifacts.keySet()) {
-                Collection<Artifact> artifacts = orderedArtifacts.get(key);
+            for (Collection<Artifact> artifacts : orderedArtifacts.values()) {
                 ExecutionPlanBuilder builder = buildExecutionPlan(artifacts, 
satisfiedPackages, context, registryHome, useStrictMode);
                 ByteArrayOutputStream baos = new ByteArrayOutputStream();
                 builder.save(baos);
-                executionPlans.add(baos.toString("UTF-8"));
+                executionPlans.add(baos.toString(StandardCharsets.UTF_8));
             }
             // Workaround for too bold relocation mechanism - corresponding 
details at https://issues.apache.org/jira/browse/MSHADE-156
             final Configuration initcfg = new 
Configuration("org.apache.sling.jcr.packageinit.impl.ExecutionPlanRepoInitializer");

Reply via email to