Changeset dc8a822 for router


Ignore:
Timestamp:
Nov 25, 2018 3:16:18 PM (20 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
9badfd0
Parents:
43e0d4f9
Message:

GeoIP: Reduce object churn, add test to command line tools

Location:
router/java/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/com/maxmind/db/Decoder.java

    r43e0d4f9 rdc8a822  
    88import java.nio.charset.CharsetDecoder;
    99import java.util.ArrayList;
    10 import java.util.Collections;
    1110import java.util.HashMap;
    1211import java.util.List;
     
    256255    }
    257256
     257    /** @return modifiable, don't modify it */
    258258    private List<Object> decodeArray(int size) throws IOException {
    259259
     
    264264        }
    265265
    266         return Collections.unmodifiableList(array);
    267     }
    268 
     266        return array;
     267    }
     268
     269    /** @return modifiable, don't modify it */
    269270    private Map<String, Object> decodeMap(int size) throws IOException {
    270271        int capacity = (int) (size / 0.75F + 1.0F);
     
    277278        }
    278279
    279         return Collections.unmodifiableMap(map);
     280        return map;
    280281    }
    281282
  • router/java/src/net/i2p/router/CommandLine.java

    r43e0d4f9 rdc8a822  
    1515
    1616    protected static final List<String> RCLASSES = Arrays.asList(new String[] {
     17        "com.maxmind.geoip2.DatabaseReader",
    1718        "net.i2p.data.router.RouterInfo",
    1819        "net.i2p.data.router.RouterKeyGenerator",
Note: See TracChangeset for help on using the changeset viewer.