Changeset 4067 in josm
- Timestamp:
- 2011-05-02T07:32:20+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java
r4065 r4067 178 178 179 179 public synchronized void loadIndex() { 180 File indexFile = new File(cacheDir, INDEX_FILENAME); 180 181 try { 181 182 JAXBContext context = JAXBContext.newInstance( … … 183 184 WmsCacheType.class.getClassLoader()); 184 185 Unmarshaller unmarshaller = context.createUnmarshaller(); 185 WmsCacheType cacheEntries = (WmsCacheType)unmarshaller.unmarshal( 186 new FileInputStream(new File(cacheDir, INDEX_FILENAME))); 186 WmsCacheType cacheEntries = (WmsCacheType)unmarshaller.unmarshal(new FileInputStream(indexFile)); 187 187 totalFileSize = cacheEntries.getTotalFileSize(); 188 188 if (cacheEntries.getTileSize() != tileSize) { … … 201 201 } 202 202 } catch (Exception e) { 203 e.printStackTrace(); 204 System.out.println("Unable to load index for wms-cache, new file will be created"); 203 if (indexFile.exists()) { 204 e.printStackTrace(); 205 System.out.println("Unable to load index for wms-cache, new file will be created"); 206 } else { 207 System.out.println("Index for wms-cache doesn't exist, new file will be created"); 208 } 205 209 } 206 210
Note:
See TracChangeset
for help on using the changeset viewer.