[JGIT PATCH 09/12] Use a Java 5 style iteration over the Config entries list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx>
---
 .../src/org/spearce/jgit/lib/Config.java           |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/Config.java b/org.spearce.jgit/src/org/spearce/jgit/lib/Config.java
index 8eb2e2a..e379c37 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/Config.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/Config.java
@@ -50,7 +50,6 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -680,9 +679,7 @@ private int findSectionEnd(final String section, final String subsection) {
 	 *             stream to write the configuration to.
 	 */
 	protected void printConfig(final PrintWriter r) {
-		final Iterator<Entry> i = entries.iterator();
-		while (i.hasNext()) {
-			final Entry e = i.next();
+		for (final Entry e : entries) {
 			if (e.prefix != null) {
 				r.print(e.prefix);
 			}
-- 
1.6.4.rc1.186.g60aa0c

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]