Ignore:
Timestamp:
2013-03-08T19:16:00+01:00 (11 years ago)
Author:
Don-vip
Message:

Remove old code

Location:
trunk/src/org/openstreetmap/josm/gui/preferences
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java

    r5586 r5763  
    15031503        abstract public SourceEntry deserialize(Map<String, String> entryStr);
    15041504
    1505         // migration can be removed end 2012
    1506         abstract public Map<String, String> migrate(Collection<String> old);
    1507 
    15081505        public List<SourceEntry> get() {
    15091506
    1510             boolean migration = false;
    15111507            Collection<Map<String, String>> src = Main.pref.getListOfStructs(pref, (Collection<Map<String, String>>) null);
    1512             if (src == null) {
    1513                 Collection<Collection<String>> srcOldPrefFormat = Main.pref.getArray(prefOld, null);
    1514                 if (srcOldPrefFormat != null) {
    1515                     migration = true;
    1516                     src = new ArrayList<Map<String, String>>();
    1517                     for (Collection<String> p : srcOldPrefFormat) {
    1518                         src.add(migrate(p));
    1519                     }
    1520                 }
    1521             }
    15221508            if (src == null)
    15231509                return new ArrayList<SourceEntry>(getDefault());
     
    15301516                }
    15311517            }
    1532             if (migration) {
    1533                 put(entries);
    1534             }
    15351518            return entries;
    15361519        }
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java

    r5631 r5763  
    268268            return new SourceEntry(s.get("url"), s.get("ptoken"), s.get("title"), Boolean.parseBoolean(s.get("active")));
    269269        }
    270 
    271         @Override
    272         public Map<String, String> migrate(Collection<String> old) {
    273             List<String> entryStr = new ArrayList<String>(old);
    274             if (entryStr.size() < 4)
    275                 return null;
    276             Map<String, String> res = new HashMap<String, String>();
    277             res.put("url", entryStr.get(0));
    278             res.put("ptoken", entryStr.get(1));
    279             res.put("title", entryStr.get(2));
    280             res.put("active", entryStr.get(3));
    281             return res;
    282         }
    283270    }
    284271
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java

    r5631 r5763  
    336336            return new SourceEntry(s.get("url"), null, s.get("title"), true);
    337337        }
    338 
    339         @Override
    340         public Map<String, String> migrate(Collection<String> old) {
    341             List<String> entryStr = new ArrayList<String>(old);
    342             if (entryStr.size() < 2)
    343                 return null;
    344             Map<String, String> res = new HashMap<String, String>();
    345             res.put("url", entryStr.get(0));
    346             res.put("title", entryStr.get(1));
    347             return res;
    348         }
    349 
    350338    }
    351339
Note: See TracChangeset for help on using the changeset viewer.