Changeset 7853 in josm for trunk/src/org
- Timestamp:
- 2014-12-20T13:31:07+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/CachedFile.java
r7835 r7853 66 66 67 67 protected File cacheFile = null; 68 boolean initialized = false;68 protected boolean initialized = false; 69 69 70 70 public static final long DEFAULT_MAXTIME = -1L; … … 178 178 throw new IOException(tr("Failed to open input stream for resource ''{0}''", name)); 179 179 return is; 180 } else throw new IOException(); 180 } else { 181 throw new IllegalStateException("No file found for something different from a resource: "+name); 182 } 181 183 } 182 184 return new FileInputStream(file); … … 189 191 * @throws IOException when the resource with the given name could not be retrieved 190 192 */ 191 public File getFile() throws IOException {193 public synchronized File getFile() throws IOException { 192 194 if (initialized) 193 195 return cacheFile;
Note:
See TracChangeset
for help on using the changeset viewer.