From 3b44b226098757d3bf0f4be10100493565cb9cc8 Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Fri, 29 Oct 2010 14:41:39 +0200 Subject: [PATCH] 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 --- org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java | 5 +++-- 1 file 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 2099352f5..045fecd21 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> result : lowLevelResults + .entrySet()) + addConflict(result.getKey(), result.getValue()); } /**