Changeset 7081 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2014-05-09T04:49:54+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
r7058 r7081 228 228 } 229 229 230 /** 231 * Replies the local file. 232 * @return The local file on disk 233 */ 230 234 public File getFile() { 231 235 return file; -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r7037 r7081 615 615 url = new URL(new URL(getBaseUrl()), urlSuffix); 616 616 Main.info(requestMethod + " " + url + "... "); 617 Main.debug(requestBody); 617 618 // fix #5369, see http://www.tikalk.com/java/forums/httpurlconnection-disable-keep-alive 618 619 activeConnection = Utils.openHttpConnection(url, false); -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r7033 r7081 439 439 } 440 440 441 // user attribute added in 0.4 API442 441 String user = parser.getAttributeValue(null, "user"); 443 // uid attribute added in 0.6 API444 442 String uid = parser.getAttributeValue(null, "uid"); 445 443 current.setUser(createUser(uid, user)); 446 444 447 // visible attribute added in 0.4 API448 445 String visible = parser.getAttributeValue(null, "visible"); 449 446 if (visible != null) { … … 474 471 } else { 475 472 // version expected for OSM primitives with an id assigned by the server (id > 0), since API 0.6 476 //477 473 if (!current.isNew() && ds.getVersion() != null && "0.6".equals(ds.getVersion())) { 478 474 throwException(tr("Missing attribute ''version'' on OSM primitive with ID {0}.", Long.toString(current.getUniqueId()))); … … 497 493 try { 498 494 current.setChangesetId(Integer.parseInt(v)); 499 } catch(NumberFormatException e) { 495 } catch (IllegalArgumentException e) { 496 Main.debug(e.getMessage()); 500 497 if (current.isNew()) { 501 498 // for a new primitive we just log a warning … … 506 503 throwException(tr("Illegal value for attribute ''changeset''. Got {0}.", v), e); 507 504 } 508 } 509 if (current.getChangesetId() <=0) { 505 } catch (IllegalStateException e) { 506 // thrown for positive changeset id on new primitives 507 Main.info(e.getMessage()); 508 current.setChangesetId(0); 509 } 510 if (current.getChangesetId() <= 0) { 510 511 if (current.isNew()) { 511 512 // for a new primitive we just log a warning
Note:
See TracChangeset
for help on using the changeset viewer.