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 <[email protected]>
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;
                 }
             }

Reply via email to