Changeset 4868 in josm
- Timestamp:
- 2012-01-24T21:28:35+01:00 (13 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 3 3 build 4 4 plugin-check 5 findbugs-josm.xml
-
- Property svn:ignore
-
trunk/.settings/edu.umd.cs.findbugs.core.prefs
r4838 r4868 1 1 #FindBugs User Preferences 2 # Sat Jan 21 17:37:33CET 20122 #Tue Jan 24 21:25:31 CET 2012 3 3 cloud_id=edu.umd.cs.findbugs.cloud.doNothingCloud 4 4 detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true … … 128 128 effort=max 129 129 excludefilter0=tools/findbugs/josm-filter.xml|true 130 filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,EXPERIMENTAL,MT_CORRECTNESS,PERFORMANCE,STYLE|false|16 131 filter_settings_neg= MALICIOUS_CODE,NOISE,I18N,SECURITY|130 filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,EXPERIMENTAL,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,STYLE|false|16 131 filter_settings_neg=NOISE,I18N,SECURITY| 132 132 run_at_full_build=false -
trunk/src/org/openstreetmap/josm/actions/PurgeAction.java
r4064 r4868 221 221 tr("This operation makes JOSM forget the selected objects.<br> " + 222 222 "They will be removed from the layer, but <i>not</i> deleted<br> " + 223 "on the server when uploading.")+"</html>", 224 ImageProvider.get("purge"), JLabel.LEFT), GBC.eol().fill(GBC.HORIZONTAL)); 223 "on the server when uploading.")+"</html>", 224 ImageProvider.get("purge"), JLabel.LEFT), GBC.eol().fill(GBC.HORIZONTAL)); 225 225 226 226 if (!toPurgeAdditionally.isEmpty()) { … … 228 228 pnl.add(new JLabel("<html>"+ 229 229 tr("The following dependent objects will be purged<br> " + 230 "in addition to the selected objects:")+"</html>", 231 ImageProvider.get("warning-small"), JLabel.LEFT), GBC.eol().fill(GBC.HORIZONTAL)); 230 "in addition to the selected objects:")+"</html>", 231 ImageProvider.get("warning-small"), JLabel.LEFT), GBC.eol().fill(GBC.HORIZONTAL)); 232 232 233 233 Collections.sort(toPurgeAdditionally, new Comparator<OsmPrimitive>() { 234 234 public int compare(OsmPrimitive o1, OsmPrimitive o2) { 235 int type = o 1.getType().compareTo(o2.getType());235 int type = o2.getType().compareTo(o1.getType()); 236 236 if (type != 0) 237 return -type;237 return type; 238 238 return (Long.valueOf(o1.getUniqueId())).compareTo(o2.getUniqueId()); 239 239 } -
trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
r4860 r4868 92 92 @Override public double lonToTileX(double lon, int zoom) { return source.lonToTileX(lon,zoom); } 93 93 94 @Override public double tileYToLat(int y, int zoom) { return tileYToLat(y, zoom); } 95 96 @Override public double tileXToLon(int x, int zoom) { return tileXToLon(x, zoom); } 94 @Override public double tileYToLat(int y, int zoom) { return source.tileYToLat(y, zoom); } 95 96 @Override public double tileXToLon(int x, int zoom) { return source.tileXToLon(x, zoom); } 97 97 } 98 98 … … 157 157 new RenamedSourceDecorator(new OsmTileSource.TilesAtHome(), "Osmarender"), 158 158 new RenamedSourceDecorator(new OsmTileSource.CycleMap(), "Cyclemap") 159 ); 159 ); 160 160 } 161 161 }); … … 317 317 Math.min(l2.getLat(), l1.getLat()), 318 318 LatLon.toIntervalLon(Math.min(l1.getLon(), l2.getLon())) 319 ), 320 new LatLon( 321 Math.max(l2.getLat(), l1.getLat()), 322 LatLon.toIntervalLon(Math.max(l1.getLon(), l2.getLon()))) 323 ); 319 ), 320 new LatLon( 321 Math.max(l2.getLat(), l1.getLat()), 322 LatLon.toIntervalLon(Math.max(l1.getLon(), l2.getLon()))) 323 ); 324 324 Bounds oldValue = this.bbox; 325 325 this.bbox = b; … … 355 355 public void setBoundingBox(Bounds bbox) { 356 356 if (bbox == null || (bbox.getMin().lat() == 0.0 && bbox.getMin().lon() == 0.0 357 && bbox.getMax().lat() == 0.0 && bbox.getMax().lon() == 0.0)) { 357 && bbox.getMax().lat() == 0.0 && bbox.getMax().lon() == 0.0)) { 358 358 this.bbox = null; 359 359 iSelectionRectStart = null; … … 366 366 double minLon = bbox.getMin().lon(); 367 367 double maxLon = bbox.getMax().lon(); 368 368 369 369 if (bbox.crosses180thMeridian()) { 370 370 minLon -= 360.0; … … 375 375 int x1 = OsmMercator.LonToX(minLon, MAX_ZOOM); 376 376 int x2 = OsmMercator.LonToX(maxLon, MAX_ZOOM); 377 377 378 378 iSelectionRectStart = new Point(Math.min(x1, x2), Math.min(y1, y2)); 379 379 iSelectionRectEnd = new Point(Math.max(x1, x2), Math.max(y1, y2)); -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java
r3215 r4868 90 90 int result = 1; 91 91 result = prime * result 92 + ((priority == null) ? 0 : priority.hashCode()); 92 + ((priority == null) ? 0 : priority.hashCode()); 93 93 result = prime * result + ((value == null) ? 0 : value.hashCode()); 94 94 return result; … … 117 117 118 118 public int compareTo(AutoCompletionListItem other) { 119 int ret = this.priority.compareTo(other.priority); 120 ret = -ret; // higher priority items come first in the list 119 int ret = other.priority.compareTo(priority); // higher priority items come first in the list 121 120 if (ret != 0) 122 121 return ret; -
trunk/src/org/openstreetmap/josm/io/imagery/OsmosnimkiOffsetServer.java
r4240 r4868 31 31 String response = rdr.readLine(); 32 32 System.out.println(tr("Offset server response: {0}", response)); 33 if (response == null) 34 return false; 33 35 if (response.contains("\"offsets_available\": true")) return true; 34 36 } catch (Exception e) { … … 46 48 final BufferedReader rdr = new BufferedReader(new InputStreamReader(url.openConnection().getInputStream(), "UTF-8")); 47 49 String s = rdr.readLine(); 50 if (s == null) 51 return null; 48 52 int i = s.indexOf(','); 49 53 if (i == -1) return null; -
trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
r4718 r4868 149 149 public InputStream getInputStream(String uriStr) throws IOException { 150 150 File file = getFile(uriStr); 151 try{152 if (file != null)151 if (file != null) { 152 try { 153 153 return new BufferedInputStream(new FileInputStream(file)); 154 else if (inZipPath != null) {155 ZipEntry entry = zipFile.getEntry(inZipPath);156 if (entry != null) {157 InputStream is = zipFile.getInputStream(entry);158 return is;159 }160 }161 } catch (FileNotFoundException e) {162 throw new IOException(tr("File ''{0}'' does not exist.", file.getPath()));154 } catch (FileNotFoundException e) { 155 throw new IOException(tr("File ''{0}'' does not exist.", file.getPath())); 156 } 157 } else if (inZipPath != null) { 158 ZipEntry entry = zipFile.getEntry(inZipPath); 159 if (entry != null) { 160 InputStream is = zipFile.getInputStream(entry); 161 return is; 162 } 163 163 } 164 164 throw new IOException(tr("Unable to locate file ''{0}''.", uriStr));
Note:
See TracChangeset
for help on using the changeset viewer.