Changeset 13196 in josm


Ignore:
Timestamp:
2017-12-06T19:19:04+01:00 (11 days ago)
Author:
Don-vip
Message:

fix #15643 - make sure OSM IDs do not use thousands separators in log and error messages

Location:
trunk/src/org/openstreetmap/josm/io
Files:
2 edited

Legend:

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

    r12620 r13196  
    9595                        throw new IllegalDataException(
    9696                                tr("Way with external ID ''{0}'' includes missing node with external ID ''{1}''.",
    97                                         externalWayId,
    98                                         id));
     97                                        Long.toString(externalWayId),
     98                                        Long.toString(id)));
    9999                    // create an incomplete node if necessary
    100100                    n = (Node) ds.getPrimitiveById(id, OsmPrimitiveType.NODE);
     
    105105                }
    106106                if (n.isDeleted()) {
    107                     Logging.info(tr("Deleted node {0} is part of way {1}", id, w.getId()));
     107                    Logging.info(tr("Deleted node {0} is part of way {1}", Long.toString(id), Long.toString(w.getId())));
    108108                } else {
    109109                    wayNodes.add(n);
     
    113113            if (w.hasIncompleteNodes()) {
    114114                Logging.info(tr("Way {0} with {1} nodes has incomplete nodes because at least one node was missing in the loaded data.",
    115                           externalWayId, w.getNodesCount()));
     115                        Long.toString(externalWayId), w.getNodesCount()));
    116116            }
    117117            ds.addPrimitive(w);
     
    153153                        throw new IllegalDataException(
    154154                                tr("Relation with external id ''{0}'' refers to a missing primitive with external id ''{1}''.",
    155                                         externalRelationId,
    156                                         rm.getMemberId()));
     155                                        Long.toString(externalRelationId),
     156                                        Long.toString(rm.getMemberId())));
    157157
    158158                    // member refers to OSM primitive which was not present in the parsed data
     
    176176                }
    177177                if (primitive.isDeleted()) {
    178                     Logging.info(tr("Deleted member {0} is used by relation {1}", primitive.getId(), relation.getId()));
     178                    Logging.info(tr("Deleted member {0} is used by relation {1}",
     179                            Long.toString(primitive.getId()), Long.toString(relation.getId())));
    179180                } else {
    180181                    relationMembers.add(new RelationMember(rm.getRole(), primitive));
  • trunk/src/org/openstreetmap/josm/io/OsmReader.java

    r12620 r13196  
    277277        }
    278278        if (w.isDeleted() && !nodeIds.isEmpty()) {
    279             Logging.info(tr("Deleted way {0} contains nodes", w.getUniqueId()));
     279            Logging.info(tr("Deleted way {0} contains nodes", Long.toString(w.getUniqueId())));
    280280            nodeIds = new ArrayList<>();
    281281        }
     
    287287        if (parser.getAttributeValue(null, "ref") == null) {
    288288            throwException(
    289                     tr("Missing mandatory attribute ''{0}'' on <nd> of way {1}.", "ref", w.getUniqueId())
     289                    tr("Missing mandatory attribute ''{0}'' on <nd> of way {1}.", "ref", Long.toString(w.getUniqueId()))
    290290            );
    291291        }
     
    293293        if (id == 0) {
    294294            throwException(
    295                     tr("Illegal value of attribute ''ref'' of element <nd>. Got {0}.", id)
     295                    tr("Illegal value of attribute ''ref'' of element <nd>. Got {0}.", Long.toString(id))
    296296            );
    297297        }
     
    327327        }
    328328        if (r.isDeleted() && !members.isEmpty()) {
    329             Logging.info(tr("Deleted relation {0} contains members", r.getUniqueId()));
     329            Logging.info(tr("Deleted relation {0} contains members", Long.toString(r.getUniqueId())));
    330330            members = new ArrayList<>();
    331331        }
     
    339339        String value = parser.getAttributeValue(null, "ref");
    340340        if (value == null) {
    341             throwException(tr("Missing attribute ''ref'' on member in relation {0}.", r.getUniqueId()));
     341            throwException(tr("Missing attribute ''ref'' on member in relation {0}.", Long.toString(r.getUniqueId())));
    342342        }
    343343        try {
Note: See TracChangeset for help on using the changeset viewer.