summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorRobin Stocker2010-10-29 08:41:39 (EDT)
committer Robin Stocker2010-10-29 08:41:39 (EDT)
commit3b44b226098757d3bf0f4be10100493565cb9cc8 (patch)
treecc141f1f7a52fdb39e839c252bb4fd529293d214
parent7f939ba86e4c4ce379b4dc62045109a91e97dd72 (diff)
downloadjgit-3b44b226098757d3bf0f4be10100493565cb9cc8.zip
jgit-3b44b226098757d3bf0f4be10100493565cb9cc8.tar.gz
jgit-3b44b226098757d3bf0f4be10100493565cb9cc8.tar.bz2
Use entrySet() instead of keySet()refs/changes/19/1819/1
The value was accessed every time in the loop body with get(), so use the more efficient entrySet(). Change-Id: I91d90cbd0b0d03ca4a3db986c58b8d80d80f40a4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java
index 2099352..045fecd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java
@@ -169,8 +169,9 @@ public class MergeResult {
this.mergeStrategy = mergeStrategy;
this.description = description;
if (lowLevelResults != null)
- for (String path : lowLevelResults.keySet())
- addConflict(path, lowLevelResults.get(path));
+ for (Map.Entry<String, org.eclipse.jgit.merge.MergeResult<?>> result : lowLevelResults
+ .entrySet())
+ addConflict(result.getKey(), result.getValue());
}
/**