Use entrySet() instead of keySet()

The value was accessed every time in the loop body with get(),
so use the more efficient entrySet().

Change-Id: I91d90cbd0b0d03ca4a3db986c58b8d80d80f40a4
This commit is contained in:
Robin Stocker 2010-10-29 14:41:39 +02:00
parent 7f939ba86e
commit 3b44b22609
1 changed files with 3 additions and 2 deletions

View File

@ -169,8 +169,9 @@ public MergeResult(ObjectId newHead, ObjectId base,
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());
}
/**