SAM: for each

This commit is contained in:
str4d
2013-11-22 11:36:26 +00:00
parent 3bc0be1cbe
commit f9f0e6d0a2

View File

@@ -11,7 +11,7 @@ package net.i2p.sam;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Enumeration;
import java.util.Map;
import java.util.Properties;
import java.util.StringTokenizer;
@@ -188,14 +188,13 @@ public class SAMUtils {
/* Dump a Properties object in an human-readable form */
private static String dumpProperties(Properties props) {
Enumeration names = props.propertyNames();
StringBuilder builder = new StringBuilder();
String key, val;
boolean firstIter = true;
while (names.hasMoreElements()) {
key = (String)names.nextElement();
val = props.getProperty(key);
for (Map.Entry<Object, Object> entry : props.entrySet()) {
key = (String) entry.getKey();
val = (String) entry.getValue();
if (!firstIter) {
builder.append(";");