Ignore:
Timestamp:
2014-04-27T15:48:04+02:00 (10 years ago)
Author:
Don-vip
Message:

drop support of OSM API 0.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/OsmReader.java

    r7012 r7013  
    121121            throwException(tr("Missing mandatory attribute ''{0}''.", "version"));
    122122        }
    123         if (!("0.5".equals(v) || "0.6".equals(v))) {
     123        if (!"0.6".equals(v)) {
    124124            throwException(tr("Unsupported version: {0}", v));
    125125        }
     
    468468                }
    469469                break;
    470             case "0.5":
    471                 if (version <= 0 && !current.isNew()) {
    472                     Main.warn(tr("Normalizing value of attribute ''version'' of element {0} to {2}, API version is ''{3}''. Got {1}.", current.getUniqueId(), version, 1, "0.5"));
    473                     version = 1;
    474                 } else if (version < 0 && current.isNew()) {
    475                     Main.warn(tr("Normalizing value of attribute ''version'' of element {0} to {2}, API version is ''{3}''. Got {1}.", current.getUniqueId(), version, 0, "0.5"));
    476                     version = 0;
    477                 }
    478                 break;
    479470            default:
    480471                // should not happen. API version has been checked before
     
    486477            if (!current.isNew() && ds.getVersion() != null && "0.6".equals(ds.getVersion())) {
    487478                throwException(tr("Missing attribute ''version'' on OSM primitive with ID {0}.", Long.toString(current.getUniqueId())));
    488             } else if (!current.isNew() && ds.getVersion() != null && "0.5".equals(ds.getVersion())) {
    489                 // default version in 0.5 files for existing primitives
    490                 Main.warn(tr("Normalizing value of attribute ''version'' of element {0} to {2}, API version is ''{3}''. Got {1}.", current.getUniqueId(), version, 1, "0.5"));
    491                 version= 1;
    492             } else if (current.isNew() && ds.getVersion() != null && "0.5".equals(ds.getVersion())) {
    493                 // default version in 0.5 files for new primitives, no warning necessary. This is (was) legal in API 0.5
    494                 version= 0;
    495479            }
    496480        }
Note: See TracChangeset for help on using the changeset viewer.