Ignore:
Timestamp:
2015-05-07T01:27:41+02:00 (10 years ago)
Author:
Don-vip
Message:

fix squid:S1319 - Declarations should use Java collection interfaces rather than specific implementation classes

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java

    r8304 r8338  
    4242        }
    4343        String[] args = url.substring(i+1).split("&");
    44         HashMap<String, String> map = new HashMap<>();
     44        Map<String, String> map = new HashMap<>();
    4545        for (String arg : args) {
    4646            int eq = arg.indexOf('=');
  • trunk/src/org/openstreetmap/josm/tools/Pair.java

    r7509 r8338  
    22package org.openstreetmap.josm.tools;
    33import java.util.ArrayList;
     4import java.util.List;
    45
    56/**
     
    3132    }
    3233
    33     @Override public int hashCode() {
     34    @Override
     35    public int hashCode() {
    3436        return a.hashCode() + b.hashCode();
    3537    }
    3638
    37     @Override public boolean equals(Object other) {
     39    @Override
     40    public boolean equals(Object other) {
    3841        if (other instanceof Pair<?, ?>) {
    3942            Pair<?, ?> o = (Pair<?, ?>)other;
     
    4346    }
    4447
    45     public static <T> ArrayList<T> toArrayList(Pair<T, T> p) {
    46         ArrayList<T> l = new ArrayList<>(2);
     48    public static <T> List<T> toList(Pair<T, T> p) {
     49        List<T> l = new ArrayList<>(2);
    4750        l.add(p.a);
    4851        l.add(p.b);
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r7606 r8338  
    310310        Main.platform.initSystemShortcuts();
    311311        // (2) User defined shortcuts
    312         LinkedList<Shortcut> newshortcuts = new LinkedList<>();
     312        List<Shortcut> newshortcuts = new LinkedList<>();
    313313        for(String s : Main.pref.getAllPrefixCollectionKeys("shortcut.entry.")) {
    314314            newshortcuts.add(new Shortcut(s));
Note: See TracChangeset for help on using the changeset viewer.