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/sds/src/org/openstreetmap/hot/sds
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/DetermineSdsModificationsUploadHook.java

    r28160 r30737  
    4040    public boolean checkUpload(APIDataSet apiDataSet) {
    4141       
    42         ArrayList<OsmPrimitive> droplist = new ArrayList<OsmPrimitive>();
     42        ArrayList<OsmPrimitive> droplist = new ArrayList<>();
    4343       
    4444        // check deleted primitives for special tags.
     
    5454        for (OsmPrimitive upd : apiDataSet.getPrimitivesToUpdate()) {
    5555               
    56                 HashSet<String> allKeys = new HashSet<String>();
     56                HashSet<String> allKeys = new HashSet<>();
    5757                boolean specialTags = false;
    5858               
     
    8787               
    8888                // assemble new set of special tags. might turn out to be empty.
    89                 HashMap<String, String> newSpecialTags = new HashMap<String, String>();
     89                HashMap<String, String> newSpecialTags = new HashMap<>();
    9090                for (String key : upd.keySet()) {
    9191                        if (isSpecialKey(key)) newSpecialTags.put(key, upd.get(key));
     
    151151        for (OsmPrimitive add : apiDataSet.getPrimitivesToAdd()) {
    152152                // assemble new set of special tags. might turn out to be empty.
    153                 HashMap<String, String> newSpecialTags = new HashMap<String, String>();
     153                HashMap<String, String> newSpecialTags = new HashMap<>();
    154154                for (String key : add.keySet()) {
    155155                        if (isSpecialKey(key)) newSpecialTags.put(key, add.get(key));
  • applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/ReadPostprocessor.java

    r29684 r30737  
    3838    public void postprocessDataSet(DataSet ds, ProgressMonitor progress) {
    3939       
    40                 nodeList = new ArrayList<Long>();
    41                 wayList = new ArrayList<Long>();
    42                 relationList = new ArrayList<Long>();
     40                nodeList = new ArrayList<>();
     41                wayList = new ArrayList<>();
     42                relationList = new ArrayList<>();
    4343
    4444                Visitor adder = new Visitor() {
  • applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsApi.java

    r28160 r30737  
    4141
    4242    /** the collection of instantiated OSM APIs */
    43     private static HashMap<String, SdsApi> instances = new HashMap<String, SdsApi>();
     43    private static HashMap<String, SdsApi> instances = new HashMap<>();
    4444   
    4545    /**
  • applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialAgent.java

    r29854 r30737  
    2727public class SdsCredentialAgent extends AbstractCredentialsAgent {
    2828
    29     Map<RequestorType, PasswordAuthentication> sdsMemoryCredentialsCache = new HashMap<RequestorType, PasswordAuthentication>();
     29    Map<RequestorType, PasswordAuthentication> sdsMemoryCredentialsCache = new HashMap<>();
    3030
    3131    /**
  • applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsLoadAction.java

    r30666 r30737  
    5454        public OpenFileTask(List<File> files, SeparateDataStorePlugin p) {
    5555            super(tr("Loading files"), false /* don't ignore exception */);
    56             this.files = new ArrayList<File>(files);
     56            this.files = new ArrayList<>(files);
    5757            plugin = p;
    5858        }
  • applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsOsmWriter.java

    r28160 r30737  
    4040                out.println(">");
    4141            }
    42             List<Entry<String, String>> entries = new ArrayList<Entry<String,String>>(osm.getKeys().entrySet());
     42            List<Entry<String, String>> entries = new ArrayList<>(osm.getKeys().entrySet());
    4343            Collections.sort(entries, byKeyComparator);
    4444            for (Entry<String, String> e : entries) {
  • applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SeparateDataStorePlugin.java

    r29684 r30737  
    2929{
    3030
    31         public HashMap<Long, IPrimitive> originalNodes = new HashMap<Long, IPrimitive>();
    32         public HashMap<Long, IPrimitive> originalWays = new HashMap<Long, IPrimitive>();
    33         public HashMap<Long, IPrimitive> originalRelations = new HashMap<Long, IPrimitive>();
     31        public HashMap<Long, IPrimitive> originalNodes = new HashMap<>();
     32        public HashMap<Long, IPrimitive> originalWays = new HashMap<>();
     33        public HashMap<Long, IPrimitive> originalRelations = new HashMap<>();
    3434       
    35         public ArrayList<QueueItem> uploadQueue = new ArrayList<QueueItem>();
     35        public ArrayList<QueueItem> uploadQueue = new ArrayList<>();
    3636       
    3737        private PrimitiveVisitor learnVisitor = new PrimitiveVisitor() {
     
    113113         */
    114114        protected void clearQueue() {
    115                 ArrayList<QueueItem> newQueue = new ArrayList<QueueItem>();
     115                ArrayList<QueueItem> newQueue = new ArrayList<>();
    116116                for (QueueItem q : uploadQueue) {
    117117                        if (!q.processed) newQueue.add(q);
Note: See TracChangeset for help on using the changeset viewer.