Index: trunk/src/org/openstreetmap/josm/data/cache/CacheEntry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/CacheEntry.java	(revision 8628)
+++ trunk/src/org/openstreetmap/josm/data/cache/CacheEntry.java	(revision 8629)
@@ -26,4 +26,7 @@
      */
     public byte[] getContent() {
+        if (content == null) {
+            return new byte[]{};
+        }
         return Arrays.copyOf(content, content.length);
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/TMSSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/TMSSettingsPanel.java	(revision 8628)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/TMSSettingsPanel.java	(revision 8629)
@@ -13,5 +13,4 @@
 
 import org.openstreetmap.josm.data.imagery.TMSCachedTileLoader;
-import org.openstreetmap.josm.data.imagery.TMSCachedTileLoaderJob;
 import org.openstreetmap.josm.gui.layer.TMSLayer;
 import org.openstreetmap.josm.tools.GBC;
@@ -44,5 +43,5 @@
                 TMSLayer.PROP_MAX_ZOOM_LVL.get().intValue(), TMSLayer.MIN_ZOOM, TMSLayer.MAX_ZOOM, 1));
         maxConcurrentDownloads = new JSpinner(new SpinnerNumberModel(
-                TMSCachedTileLoaderJob.THREAD_LIMIT.get().intValue(), 0, Integer.MAX_VALUE, 1));
+                TMSCachedTileLoader.THREAD_LIMIT.get().intValue(), 0, Integer.MAX_VALUE, 1));
         maxDownloadsPerHost = new JSpinner(new SpinnerNumberModel(
                 TMSCachedTileLoader.HOST_LIMIT.get().intValue(), 0, Integer.MAX_VALUE, 1));
@@ -88,5 +87,5 @@
         this.maxZoomLvl.setValue(TMSLayer.getMaxZoomLvl(null));
         this.minZoomLvl.setValue(TMSLayer.getMinZoomLvl(null));
-        this.maxConcurrentDownloads.setValue(TMSCachedTileLoaderJob.THREAD_LIMIT.get());
+        this.maxConcurrentDownloads.setValue(TMSCachedTileLoader.THREAD_LIMIT.get());
         this.maxDownloadsPerHost.setValue(TMSCachedTileLoader.HOST_LIMIT.get());
     }
