Skip to content

Commit

Permalink
Fix lon/lat inversion in change reader
Browse files Browse the repository at this point in the history
  • Loading branch information
bchapuis committed Oct 29, 2023
1 parent d43709f commit eacecfc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ private Element readElement() throws XMLStreamException {
private Node readNode() throws XMLStreamException {
long id = Long.parseLong(reader.getAttributeValue(null, ATTRIBUTE_NAME_ID));
Info info = readInfo();
double latitude = Double.parseDouble(reader.getAttributeValue(null, ATTRIBUTE_NAME_LATITUDE));
double longitude = Double.parseDouble(reader.getAttributeValue(null, ATTRIBUTE_NAME_LONGITUDE));
double lat = Double.parseDouble(reader.getAttributeValue(null, ATTRIBUTE_NAME_LATITUDE));

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.
double lon = Double.parseDouble(reader.getAttributeValue(null, ATTRIBUTE_NAME_LONGITUDE));

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.

// read the content of the node
Map<String, Object> tags = new HashMap<>();
Expand All @@ -172,7 +172,7 @@ private Node readNode() throws XMLStreamException {
}
}

return new Node(id, info, tags, latitude, longitude);
return new Node(id, info, tags, lon, lat);
}

private Way readWay() throws XMLStreamException {
Expand Down

0 comments on commit eacecfc

Please sign in to comment.