Index: /trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 16427)
+++ /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 16428)
@@ -466,5 +466,5 @@
         // No local file + offline => nothing to do
         if (offline) {
-            return null;
+            throw new IOException(OfflineAccessException.forResource(urlStr).getMessage());
         }
 
@@ -496,6 +496,4 @@
             if (ifModifiedSince != null && con.getResponseCode() == HttpURLConnection.HTTP_NOT_MODIFIED) {
                 Logging.debug("304 Not Modified ({0})", urlStr);
-                if (localFile == null)
-                    throw new AssertionError();
                 Config.getPref().putList(prefKey,
                         Arrays.asList(Long.toString(System.currentTimeMillis()), localPathEntry.get(1)));
