Changeset 8444 in josm for trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java
- Timestamp:
- 2015-06-02T16:41:37+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java
r8404 r8444 153 153 154 154 public static int random(int min, int max) { 155 return (int)(Math.random() * ((max+1)-min) 155 return (int)(Math.random() * ((max+1)-min)) + min; 156 156 } 157 157 … … 268 268 String contentType = conn.getHeaderField("Content-Type"); 269 269 if (conn.getResponseCode() != 200 270 || contentType != null && !contentType.startsWith("image") 270 || contentType != null && !contentType.startsWith("image")) { 271 271 String xml = readException(conn); 272 272 try { … … 302 302 try (BufferedReader br = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))) { 303 303 String line = null; 304 while ((line = br.readLine()) != null) {304 while ((line = br.readLine()) != null) { 305 305 // filter non-ASCII characters and control characters 306 306 exception.append(line.replaceAll("[^\\p{Print}]", ""));
Note:
See TracChangeset
for help on using the changeset viewer.