Changeset 10234 in josm
- Timestamp:
- 2016-05-17T00:43:47+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AboutAction.java
r10062 r10234 42 42 * @author imi 43 43 */ 44 public class AboutAction extends JosmAction {44 public final class AboutAction extends JosmAction { 45 45 46 46 /** … … 130 130 displayErrorMessage(ta, tr("Failed to locate resource ''{0}''.", filePath)); 131 131 } else { 132 try {133 BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));132 try (InputStreamReader reader = new InputStreamReader(is, "UTF-8"); 133 BufferedReader br = new BufferedReader(reader)) { 134 134 String line; 135 135 while ((line = br.readLine()) != null) { 136 136 ta.append(line+'\n'); 137 137 } 138 br.close();139 138 } catch (IOException e) { 140 139 Main.warn(e); -
trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java
r9067 r10234 341 341 // our local dataset includes a deleted parent of a primitive we want 342 342 // to delete. Include this parent in the collection of uploaded primitives 343 //344 343 if (myDeletedParent != null && myDeletedParent.isDeleted()) { 345 344 if (!toUpload.contains(myDeletedParent)) { … … 352 351 } 353 352 } 354 } catch ( Exception e) {353 } catch (OsmTransferException e) { 355 354 if (canceled) 356 355 // ignore exception -
trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java
r10228 r10234 206 206 } 207 207 208 protected class PowerLineError extends TestError {208 protected static class PowerLineError extends TestError { 209 209 private final Way line; 210 210 -
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r10181 r10234 1118 1118 */ 1119 1119 public final WaySegment getNearestWaySegment(Point p, Predicate<OsmPrimitive> predicate, boolean useSelected) { 1120 WaySegment wayseg = null, ntsel = null; 1120 WaySegment wayseg = null; 1121 WaySegment ntsel = null; 1121 1122 1122 1123 for (List<WaySegment> wslist : getNearestWaySegmentsImpl(p, predicate).values()) { … … 1153 1154 */ 1154 1155 public final WaySegment getNearestWaySegment(Point p, Predicate<OsmPrimitive> predicate, 1155 boolean useSelected, Collection<OsmPrimitive> preferredRefs) { 1156 WaySegment wayseg = null, ntsel = null, ntref = null; 1157 if (preferredRefs != null && preferredRefs.isEmpty()) preferredRefs = null; 1156 boolean useSelected, Collection<OsmPrimitive> preferredRefs) { 1157 WaySegment wayseg = null; 1158 WaySegment ntsel = null; 1159 WaySegment ntref = null; 1160 if (preferredRefs != null && preferredRefs.isEmpty()) 1161 preferredRefs = null; 1158 1162 1159 1163 searchLoop: for (List<WaySegment> wslist : getNearestWaySegmentsImpl(p, predicate).values()) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r10144 r10234 973 973 switch (col) { 974 974 case 0: return layers.get(row) == getActiveLayer(); 975 case 1: return layers.get(row);976 case 2: return layers.get(row);975 case 1: 976 case 2: 977 977 case 3: return layers.get(row); 978 default: throw new RuntimeException();978 default: // Do nothing 979 979 } 980 980 } -
trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java
r10173 r10234 119 119 byte[] buffer = new byte[32768]; 120 120 int count = 0; 121 long p1 = 0, p2 = 0; 121 long p1 = 0; 122 long p2; 122 123 for (int read = in.read(buffer); read != -1; read = in.read(buffer)) { 123 124 out.write(buffer, 0, read); 124 125 count += read; 125 126 if (canceled) break; 126 p2 = 100 * count / size;127 p2 = 100L * count / size; 127 128 if (p2 != p1) { 128 129 progressMonitor.setTicks((int) p2); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r10212 r10234 912 912 lblSeconds.setText(tr("Seconds: {0}", Offset.milliseconds(100L * sldSeconds.getValue()).formatOffset())); 913 913 914 delta = Offset.milliseconds(100 * sldSeconds.getValue()914 delta = Offset.milliseconds(100L * sldSeconds.getValue() 915 915 + 1000L * 60 * sldMinutes.getValue() 916 916 + 1000L * 60 * 60 * 24 * dayOffset); -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ButtonMarker.java
r9078 r10234 66 66 67 67 String labelText = getText(); 68 if ( (labelText != null) && showTextOrIcon&& Main.pref.getBoolean("marker.buttonlabels", true)) {68 if (labelText != null && Main.pref.getBoolean("marker.buttonlabels", true)) { 69 69 g.drawString(labelText, screen.x+4, screen.y+2); 70 70 }
Note:
See TracChangeset
for help on using the changeset viewer.