Changeset 13414 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2018-02-12T02:31:14+01:00 (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/upload/ApiPreconditionCheckerHook.java
r12636 r13414 12 12 import org.openstreetmap.josm.data.APIDataSet; 13 13 import org.openstreetmap.josm.data.osm.OsmPrimitive; 14 import org.openstreetmap.josm.data.osm.Tagged; 14 15 import org.openstreetmap.josm.data.osm.Way; 15 16 import org.openstreetmap.josm.gui.ExceptionDialogUtil; … … 61 62 for (String key: osmPrimitive.keySet()) { 62 63 String value = osmPrimitive.get(key); 63 if (key.length() > 255) {64 if (key.length() > Tagged.MAX_TAG_LENGTH) { 64 65 if (osmPrimitive.isDeleted()) { 65 66 // if OsmPrimitive is going to be deleted we automatically shorten the value … … 70 71 ) 71 72 ); 72 osmPrimitive.put(key, value.substring(0, 255));73 osmPrimitive.put(key, value.substring(0, Tagged.MAX_TAG_LENGTH)); 73 74 continue; 74 75 } 75 76 JOptionPane.showMessageDialog(Main.parent, 76 77 tr("Length of value for tag ''{0}'' on object {1} exceeds the max. allowed length {2}. Values length is {3}.", 77 key, Long.toString(osmPrimitive.getId()), 255, value.length()78 key, Long.toString(osmPrimitive.getId()), Tagged.MAX_TAG_LENGTH, value.length() 78 79 ), 79 80 tr("Precondition Violation"),
Note: See TracChangeset
for help on using the changeset viewer.