You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by si...@apache.org on 2019/06/11 17:16:14 UTC

[sling-org-apache-sling-feature-cpconverter] branch master updated: @trivial avoid to touch the map twice when iterating

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

simonetripodi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git


The following commit(s) were added to refs/heads/master by this push:
     new 4c64dee  @trivial avoid to touch the map twice when iterating
4c64dee is described below

commit 4c64dee451bee0b03aa00283a52ac07e1f2236d5
Author: Simo Tripodi <st...@adobe.com>
AuthorDate: Tue Jun 11 19:16:03 2019 +0200

    @trivial avoid to touch the map twice when iterating
---
 .../feature/cpconverter/ContentPackage2FeatureModelConverter.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverter.java b/src/main/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverter.java
index 7dff3a7..522598d 100644
--- a/src/main/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverter.java
+++ b/src/main/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverter.java
@@ -236,9 +236,9 @@ public class ContentPackage2FeatureModelConverter extends BaseVaultPackageScanne
         }
 
         for (Dependency dep : pack.getDependencies()) {
-            for (PackageId id : idPackageMapping.keySet()) {
-                if (dep.matches(id)) {
-                    orderDependencies(idFileMap, idPackageMapping, idPackageMapping.get(id), visited);
+            for (java.util.Map.Entry<PackageId, VaultPackage> entry : idPackageMapping.entrySet()) {
+                if (dep.matches(entry.getKey())) {
+                    orderDependencies(idFileMap, idPackageMapping, entry.getValue(), visited);
                     break;
                 }
             }