Changeset 7853 in josm for trunk/src/org


Ignore:
Timestamp:
2014-12-20T13:31:07+01:00 (10 years ago)
Author:
Don-vip
Message:

fix/debug problems seen on Jenkins:

  • delete old windows installer files before building new one
  • better error message for unexplained regression + attempt to fix it by synchronization in CachedFile
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/CachedFile.java

    r7835 r7853  
    6666
    6767    protected File cacheFile = null;
    68     boolean initialized = false;
     68    protected boolean initialized = false;
    6969
    7070    public static final long DEFAULT_MAXTIME = -1L;
     
    178178                    throw new IOException(tr("Failed to open input stream for resource ''{0}''", name));
    179179                return is;
    180             } else throw new IOException();
     180            } else {
     181                throw new IllegalStateException("No file found for something different from a resource: "+name);
     182            }
    181183        }
    182184        return new FileInputStream(file);
     
    189191     * @throws IOException when the resource with the given name could not be retrieved
    190192     */
    191     public File getFile() throws IOException {
     193    public synchronized File getFile() throws IOException {
    192194        if (initialized)
    193195            return cacheFile;
Note: See TracChangeset for help on using the changeset viewer.