- Timestamp:
- 2015-07-15T21:20:51+02:00 (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
r8602 r8604 199 199 */ 200 200 protected boolean isObjectLoadable() { 201 if (cacheData == null) { 202 return false; 203 } 201 204 byte[] content = cacheData.getContent(); 202 205 return content != null && content.length > 0; … … 338 341 339 342 attributes.setResponseCode(urlConn.getResponseCode()); 340 byte[] raw = Utils.readBytesFromStream(urlConn.getInputStream()); 343 byte[] raw; 344 if (urlConn.getResponseCode() == 200) { 345 raw = Utils.readBytesFromStream(urlConn.getInputStream()); 346 } else { 347 raw = new byte[]{}; 348 } 341 349 342 350 if (isResponseLoadable(urlConn.getHeaderFields(), urlConn.getResponseCode(), raw)) { … … 440 448 urlConn.setReadTimeout(readTimeout); // 30 seconds read timeout 441 449 urlConn.setConnectTimeout(connectTimeout); 442 for (Map.Entry<String, String> e: headers.entrySet()) { 443 urlConn.setRequestProperty(e.getKey(), e.getValue()); 450 if (headers != null) { 451 for (Map.Entry<String, String> e: headers.entrySet()) { 452 urlConn.setRequestProperty(e.getKey(), e.getValue()); 453 } 444 454 } 445 455 if (force) { -
trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
r8598 r8604 142 142 } 143 143 144 private static finalString[] getLayerNames(Collection<Layer> layers) {144 private static String[] getLayerNames(Collection<Layer> layers) { 145 145 Collection<String> ret = new ArrayList<>(); 146 146 for (Layer layer: layers) { -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r8602 r8604 186 186 } 187 187 188 189 188 if (tileLoader == null) 190 189 tileLoader = new OsmTileLoader(this); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java
r8600 r8604 55 55 public class CacheContentsPanel extends JPanel { 56 56 57 private static class ButtonColumn extends AbstractCellEditor implements TableCellRenderer, TableCellEditor, ActionListener {57 private static final class ButtonColumn extends AbstractCellEditor implements TableCellRenderer, TableCellEditor, ActionListener { 58 58 private final Action action; 59 59 private final JButton renderButton;
Note:
See TracChangeset
for help on using the changeset viewer.