Changeset 53623da2 for apps/addressbook


Ignore:
Timestamp:
Nov 20, 2013 11:14:40 PM (7 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
817f531
Parents:
24ae66d
Message:

addressbook: type arguments, unused imports

Location:
apps/addressbook/java/src/net/i2p/addressbook
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java

    r24ae66d r53623da2  
    121121                subf = tmp;
    122122            } else {
    123                 a = Collections.EMPTY_MAP;
     123                a = Collections.emptyMap();
    124124                tmp.delete();
    125125            }
    126126        } catch (IOException ioe) {
    127             a = Collections.EMPTY_MAP;
     127            a = Collections.emptyMap();
    128128        }
    129129        this.addresses = a;
     
    149149            a = ConfigParser.parse(file);
    150150        } catch (IOException exp) {
    151             a = new HashMap();
     151            a = new HashMap<String, String>();
    152152        }
    153153        this.addresses = a;
  • apps/addressbook/java/src/net/i2p/addressbook/ConfigIterator.java

    r24ae66d r53623da2  
    139139            if (!(o instanceof Map.Entry))
    140140                return false;
    141             Map.Entry e = (Map.Entry) o;
     141            @SuppressWarnings("unchecked")
     142            Map.Entry<Object, Object> e = (Map.Entry<Object, Object>) o;
    142143            return key.equals(e.getKey()) && value.equals(e.getValue());
    143144        }
  • apps/addressbook/java/src/net/i2p/addressbook/ConfigParser.java

    r24ae66d r53623da2  
    8888     */
    8989    public static Map<String, String>  parse(BufferedReader input) throws IOException {
    90         Map<String, String>  result = new HashMap();
     90        Map<String, String>  result = new HashMap<String, String>();
    9191        String inputLine;
    9292        inputLine = input.readLine();
     
    180180    public static List<String> parseSubscriptions(BufferedReader input)
    181181            throws IOException {
    182         List<String> result = new LinkedList();
     182        List<String> result = new LinkedList<String>();
    183183        String inputLine = input.readLine();
    184184        while (inputLine != null) {
  • apps/addressbook/java/src/net/i2p/addressbook/Daemon.java

    r24ae66d r53623da2  
    252252        delay *= 60 * 60 * 1000;
    253253       
    254         List<String> defaultSubs = new LinkedList();
     254        List<String> defaultSubs = new LinkedList<String>();
    255255        // defaultSubs.add("http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/i2p/hosts.txt");
    256256        defaultSubs.add("http://www.i2p2.i2p/hosts.txt");
     
    332332        }
    333333       
    334         Map<String, String> defaultSettings = new HashMap();
     334        Map<String, String> defaultSettings = new HashMap<String, String>();
    335335        defaultSettings.put("proxy_host", "127.0.0.1");
    336336        defaultSettings.put("proxy_port", "4444");
  • apps/addressbook/java/src/net/i2p/addressbook/SubscriptionIterator.java

    r24ae66d r53623da2  
    8282            //                   " ago but the minimum delay is " +
    8383            //                   DataHelper.formatDuration(this.delay));
    84             return new AddressBook(Collections.EMPTY_MAP);
     84            return new AddressBook(Collections.<String, String> emptyMap());
    8585        }
    8686    }
  • apps/addressbook/java/src/net/i2p/addressbook/SubscriptionList.java

    r24ae66d r53623da2  
    7070            File lastModifiedFile, File lastFetchedFile, long delay, List<String> defaultSubs, String proxyHost,
    7171            int proxyPort) {
    72         this.subscriptions = new LinkedList();
     72        this.subscriptions = new LinkedList<Subscription>();
    7373        this.etagsFile = etagsFile;
    7474        this.lastModifiedFile = lastModifiedFile;
     
    8585            etags = ConfigParser.parse(etagsFile);
    8686        } catch (IOException exp) {
    87             etags = new HashMap();
     87            etags = new HashMap<String, String>();
    8888        }
    8989        try {
    9090            lastModified = ConfigParser.parse(lastModifiedFile);
    9191        } catch (IOException exp) {
    92             lastModified = new HashMap();
     92            lastModified = new HashMap<String, String>();
    9393        }
    9494        try {
    9595            lastFetched = ConfigParser.parse(lastFetchedFile);
    9696        } catch (IOException exp) {
    97             lastFetched = new HashMap();
     97            lastFetched = new HashMap<String, String>();
    9898        }
    9999        for (String location : locations) {
     
    122122     */
    123123    public void write() {
    124         Map<String, String> etags = new HashMap();
    125         Map<String, String>  lastModified = new HashMap();
    126         Map<String, String>  lastFetched = new HashMap();
     124        Map<String, String> etags = new HashMap<String, String>();
     125        Map<String, String>  lastModified = new HashMap<String, String>();
     126        Map<String, String>  lastFetched = new HashMap<String, String>();
    127127        for (Subscription sub : this.subscriptions) {
    128128            if (sub.getEtag() != null) {
Note: See TracChangeset for help on using the changeset viewer.