Ignore:
Timestamp:
2015-05-15T23:49:31+02:00 (9 years ago)
Author:
Don-vip
Message:

fix some Findbugs violations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java

    r8345 r8357  
    5656
    5757        File cacheDirLockPath = new File(cacheDir, ".lock");
    58         if (!cacheDirLockPath.exists())
    59             cacheDirLockPath.createNewFile();
     58        if (!cacheDirLockPath.exists() && !cacheDirLockPath.createNewFile()) {
     59            log.log(Level.WARNING, "Cannot create cache dir lock file");
     60        }
    6061        cacheDirLock = new FileOutputStream(cacheDirLockPath).getChannel().tryLock();
    6162
Note: See TracChangeset for help on using the changeset viewer.