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/imagery_offset_db/src/iodb
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/IODBReader.java

    r29430 r30737  
    3636    public IODBReader( InputStream source ) throws IOException {
    3737        this.source = new InputSource(UTFInputStreamReader.create(source, "UTF-8"));
    38         this.offsets = new ArrayList<ImageryOffsetBase>();
     38        this.offsets = new ArrayList<>();
    3939    }
    4040
     
    212212            maxZoom = -1;
    213213            flagged = false;
    214             geometry = new ArrayList<LatLon>();
     214            geometry = new ArrayList<>();
    215215        }
    216216
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryIdGenerator.java

    r30534 r30737  
    4343
    4444        // Parse query parameters into a sorted map
    45         final Set<String> removeWMSParams = new TreeSet<String>(Arrays.asList(new String[] {
     45        final Set<String> removeWMSParams = new TreeSet<>(Arrays.asList(new String[] {
    4646                    "srs", "width", "height", "bbox", "service", "request", "version", "format", "styles", "transparent"
    4747                }));
    48         Map<String, String> qparams = new TreeMap<String, String>();
     48        Map<String, String> qparams = new TreeMap<>();
    4949        String[] qparamsStr = query.length() > 1 ? query.substring(1).split("&") : new String[0];
    5050        for( String param : qparamsStr ) {
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetPlugin.java

    r29430 r30737  
    4343        // an ugly hack to add this plugin to the toolbar
    4444        if( Main.pref.getBoolean("iodb.modify.toolbar", true) ) {
    45             Collection<String> toolbar = new LinkedList<String>(Main.toolbar.getToolString());
     45            Collection<String> toolbar = new LinkedList<>(Main.toolbar.getToolString());
    4646            if( !toolbar.contains("getoffset") ) {
    4747                toolbar.add("getoffset");
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetWatcher.java

    r29412 r30737  
    1919    private static final double THRESHOLD = 1e-8;
    2020    private static ImageryOffsetWatcher instance;
    21     private Map<Integer, ImageryLayerData> layers = new TreeMap<Integer, ImageryLayerData>();
    22     private List<OffsetStateListener> listeners = new ArrayList<OffsetStateListener>();
     21    private Map<Integer, ImageryLayerData> layers = new TreeMap<>();
     22    private List<OffsetStateListener> listeners = new ArrayList<>();
    2323    private Timer time;
    2424    private double maxDistance;
     
    192192        if( !Main.pref.getBoolean("iodb.remember.offsets", true) || id == null )
    193193            return;
    194         Collection<String> offsets = new LinkedList<String>(Main.pref.getCollection("iodb.stored.offsets"));
     194        Collection<String> offsets = new LinkedList<>(Main.pref.getCollection("iodb.stored.offsets"));
    195195        for( Iterator<String> iter = offsets.iterator(); iter.hasNext(); ) {
    196196            String[] offset = iter.next().split(":");
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialog.java

    r29412 r30737  
    137137        boolean showCalibration = Main.pref.getBoolean(PREF_CALIBRATION, true);
    138138        boolean showDeprecated = Main.pref.getBoolean(PREF_DEPRECATED, false);
    139         List<ImageryOffsetBase> filteredOffsets = new ArrayList<ImageryOffsetBase>();
     139        List<ImageryOffsetBase> filteredOffsets = new ArrayList<>();
    140140        for( ImageryOffsetBase offset : offsets ) {
    141141            if( offset.isDeprecated() && !showDeprecated )
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/StoreImageryOffsetAction.java

    r29430 r30737  
    106106        // upload object info to server
    107107        try {
    108             Map<String, String> params = new HashMap<String, String>();
     108            Map<String, String> params = new HashMap<>();
    109109            offsetObj.putServerParams(params);
    110110            StringBuilder query = null;
Note: See TracChangeset for help on using the changeset viewer.