Ignore:
Timestamp:
2014-10-18T23:07:52+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix Java 7 / unused code warnings

Location:
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java

    r30609 r30737  
    121121            // copied from
    122122            // org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog[rev4079][line802]
    123             Map<String, Integer> keyCount = new HashMap<String, Integer>();
    124             Map<String, Map<String, Integer>> valueCount = new TreeMap<String, Map<String, Integer>>();
     123            Map<String, Integer> keyCount = new HashMap<>();
     124            Map<String, Map<String, Integer>> valueCount = new TreeMap<>();
    125125            for (OsmPrimitive osm : selection) {
    126126                for (String key : osm.keySet()) {
     
    131131                        v.put(value, v.containsKey(value) ? v.get(value) + 1 : 1);
    132132                    } else {
    133                         TreeMap<String, Integer> v = new TreeMap<String, Integer>();
     133                        TreeMap<String, Integer> v = new TreeMap<>();
    134134                        v.put(value, 1);
    135135                        valueCount.put(key, v);
     
    325325                Main.main.undoRedo.add(new ChangePropertyCommand(selection, newkey, value));
    326326            } else {
    327                 Collection<Command> commands = new Vector<Command>();
     327                Collection<Command> commands = new Vector<>();
    328328                commands.add(new ChangePropertyCommand(selection, key, null));
    329329                if (value.equals(tr("<different>"))) {
    330                     HashMap<String, Vector<OsmPrimitive>> map = new HashMap<String, Vector<OsmPrimitive>>();
     330                    HashMap<String, Vector<OsmPrimitive>> map = new HashMap<>();
    331331                    for (OsmPrimitive osm : selection) {
    332332                        String val = osm.get(key);
     
    335335                                map.get(val).add(osm);
    336336                            } else {
    337                                 Vector<OsmPrimitive> v = new Vector<OsmPrimitive>();
     337                                Vector<OsmPrimitive> v = new Vector<>();
    338338                                v.add(osm);
    339339                                map.put(val, v);
  • applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OpeningTimeUtils.java

    r30117 r30737  
    1515     */
    1616    public static ArrayList<int[]> convert(ArrayList<DateTime> dateTimes) {
    17         ArrayList<int[]> ret = new ArrayList<int[]>(); // the list which is
     17        ArrayList<int[]> ret = new ArrayList<>(); // the list which is
    1818        // returned
    1919        for (int i = 0; i < dateTimes.size(); ++i) { // iterate over every entry
    2020            DateTime dateTime = dateTimes.get(i);
    21             ArrayList<DateTime> newDateTimes = new ArrayList<DateTime>();
     21            ArrayList<DateTime> newDateTimes = new ArrayList<>();
    2222
    2323            // test if the given entry is a single dayspan
    2424            if (dateTime.daySpans.size() == 1 && dateTime.daySpans.get(0).isSpan()) {
    25                 ArrayList<DaySpan> partDaySpans = new ArrayList<DaySpan>();
     25                ArrayList<DaySpan> partDaySpans = new ArrayList<>();
    2626                int start_day = dateTime.daySpans.get(0).startDay;
    2727
  • applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheEditor.java

    r30117 r30737  
    191191
    192192        setEnabled(true);
    193         timeRects = new ArrayList<TimeRect>();
     193        timeRects = new ArrayList<>();
    194194        if (time != null) {
    195195            for (int[] timeRectValues : time) {
Note: See TracChangeset for help on using the changeset viewer.