Changeset 9d7ee30


Ignore:
Timestamp:
Nov 27, 2013 1:42:34 AM (7 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
8b8e2c8
Parents:
4ee1445
Message:

More cleanups

Location:
core/java/src/net/i2p
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/client/I2PSessionImpl.java

    r4ee1445 r9d7ee30  
    1919import java.security.GeneralSecurityException;
    2020import java.util.ArrayList;
    21 import java.util.Iterator;
    2221import java.util.List;
    2322import java.util.Map;
     
    289288    private Properties filter(Properties options) {
    290289        Properties rv = new Properties();
    291         for (Iterator iter = options.keySet().iterator(); iter.hasNext();) {
    292             String key = (String) iter.next();
     290        for (Object oKey : options.keySet()) { // TODO-Java6: s/keySet()/stringPropertyNames()/
     291            String key = (String) oKey;
    293292            if (key.startsWith("java.") ||
    294293                key.startsWith("user.") ||
  • core/java/src/net/i2p/data/DataHelper.java

    r4ee1445 r9d7ee30  
    498498     *
    499499     */
    500     public static String toString(Collection col) {
     500    public static String toString(Collection<?> col) {
    501501        StringBuilder buf = new StringBuilder();
    502502        if (col != null) {
    503             for (Iterator iter = col.iterator(); iter.hasNext();) {
     503            for (Iterator<?> iter = col.iterator(); iter.hasNext();) {
    504504                Object o = iter.next();
    505505                buf.append("[").append(o).append("]");
     
    965965     *
    966966     */
    967     public final static boolean eq(Collection lhs, Collection rhs) {
     967    public final static boolean eq(Collection<?> lhs, Collection<?> rhs) {
    968968        if ((lhs == null) && (rhs == null)) return true;
    969969        if ((lhs == null) || (rhs == null)) return false;
    970970        if (lhs.size() != rhs.size()) return false;
    971         Iterator liter = lhs.iterator();
    972         Iterator riter = rhs.iterator();
     971        Iterator<?> liter = lhs.iterator();
     972        Iterator<?> riter = rhs.iterator();
    973973        while ((liter.hasNext()) && (riter.hasNext()))
    974974            if (!(eq(liter.next(), riter.next()))) return false;
     
    11331133     *
    11341134     */
    1135     public static int hashCode(Collection col) {
     1135    public static int hashCode(Collection<?> col) {
    11361136        if (col == null) return 0;
    11371137        int c = 0;
    1138         for (Iterator iter = col.iterator(); iter.hasNext();)
     1138        for (Iterator<?> iter = col.iterator(); iter.hasNext();)
    11391139            c = 7 * c + hashCode(iter.next());
    11401140        return c;
  • core/java/src/net/i2p/util/EepGet.java

    r4ee1445 r9d7ee30  
    385385                            buf.append(" KBps");
    386386                            System.out.println(buf.toString());
     387                            fmt.close();
    387388                        }
    388389                        _lastComplete = now;
Note: See TracChangeset for help on using the changeset viewer.