Changeset 31788 in osm for applications/editors/josm/plugins/mapillary/src/org
- Timestamp:
- 2015-12-02T15:30:51+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/commands/CommandDelete.java
r31500 r31788 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.history.commands; 2 3 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/commands/CommandImport.java
r31500 r31788 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.history.commands; 2 3 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/commands/CommandJoin.java
r31500 r31788 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.history.commands; 2 3 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/commands/CommandMove.java
r31513 r31788 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.history.commands; 2 3 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/commands/CommandTurn.java
r31513 r31788 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.history.commands; 2 3 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/commands/CommandUnjoin.java
r31500 r31788 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.history.commands; 2 3 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/commands/MapillaryCommand.java
r31513 r31788 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.history.commands; 2 3 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/commands/MapillaryExecutableCommand.java
r31500 r31788 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.history.commands; 2 3 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryImageInfoDownloadThread.java
r31787 r31788 45 45 @Override 46 46 public void run() { 47 try { 48 BufferedReader br = new BufferedReader(new InputStreamReader(new URL(URL 49 + this.queryString).openStream(), "UTF-8")); 47 try ( 48 BufferedReader br = new BufferedReader(new InputStreamReader( 49 new URL(URL + this.queryString).openStream(), "UTF-8") 50 ); 51 ) { 50 52 JsonObject jsonobj = Json.createReader(br).readObject(); 51 53 if (!jsonobj.getBoolean("more")) … … 56 58 data = jsonarr.getJsonObject(i); 57 59 String key = data.getString("key"); 58 for (MapillaryAbstractImage image : MapillaryLayer.getInstance().getData() 59 .getImages()) { 60 if (image instanceof MapillaryImage) { 61 if (((MapillaryImage) image).getKey().equals(key) 62 && ((MapillaryImage) image).getUser() == null) { 63 ((MapillaryImage) image).setUser(data.getString("user")); 64 ((MapillaryImage) image).setCapturedAt(data.getJsonNumber( 65 "captured_at").longValue()); 66 } 60 for (MapillaryAbstractImage image : MapillaryLayer.getInstance().getData().getImages()) { 61 if ( 62 image instanceof MapillaryImage 63 && ((MapillaryImage) image).getKey().equals(key) 64 && ((MapillaryImage) image).getUser() == null 65 ) { 66 ((MapillaryImage) image).setUser(data.getString("user")); 67 ((MapillaryImage) image).setCapturedAt(data.getJsonNumber("captured_at").longValue()); 67 68 } 68 69 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillarySequenceDownloadThread.java
r31787 r31788 52 52 @Override 53 53 public void run() { 54 try { 55 BufferedReader br; 56 br = new BufferedReader(new InputStreamReader(new URL(URL 57 + this.queryString).openStream(), "UTF-8")); 54 try ( 55 BufferedReader br = new BufferedReader(new InputStreamReader( 56 new URL(URL + this.queryString).openStream(), "UTF-8" 57 )); 58 ) { 58 59 JsonObject jsonall = Json.createReader(br).readObject(); 59 60 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryTrafficSignDownloadThread.java
r31787 r31788 46 46 @Override 47 47 public void run() { 48 BufferedReader br; 49 try { 50 br = new BufferedReader(new InputStreamReader(new URL(URL 51 + this.queryString).openStream(), "UTF-8")); 48 49 try ( 50 BufferedReader br = new BufferedReader(new InputStreamReader( 51 new URL(URL + this.queryString).openStream(), "UTF-8" 52 )); 53 ) { 52 54 JsonObject jsonobj = Json.createReader(br).readObject(); 53 55 if (!jsonobj.getBoolean("more")) {
Note:
See TracChangeset
for help on using the changeset viewer.