susidns: type arguments, for each

This commit is contained in:
str4d
2013-11-22 11:25:22 +00:00
parent 8d826cee93
commit 3bc0be1cbe
2 changed files with 5 additions and 6 deletions

View File

@@ -30,9 +30,9 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Enumeration;
import java.util.LinkedList;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import net.i2p.data.DataFormatException;
@@ -151,10 +151,9 @@ public class AddressbookBean extends BaseBean
fis = new FileInputStream( getFileName() );
addressbook.load( fis );
LinkedList<AddressBean> list = new LinkedList<AddressBean>();
Enumeration e = addressbook.keys();
while( e.hasMoreElements() ) {
String name = (String)e.nextElement();
String destination = addressbook.getProperty( name );
for( Map.Entry<Object, Object> entry : addressbook.entrySet() ) {
String name = (String) entry.getKey();
String destination = (String) entry.getValue();
if( filter != null && filter.length() > 0 ) {
if( filter.compareTo( "0-9" ) == 0 ) {
char first = name.charAt(0);

View File

@@ -88,7 +88,7 @@ public class ConfigBean implements Serializable {
// use loadProps to trim
Properties props = new OrderedProperties();
DataHelper.loadProps(props, file);
for (Map.Entry e : props.entrySet()) {
for (Map.Entry<Object, Object> e : props.entrySet()) {
buf.append((String) e.getKey()).append('=')
.append((String) e.getValue()).append('\n');
}