Ignore:
Timestamp:
2015-06-20T14:36:00+02:00 (9 years ago)
Author:
Don-vip
Message:

fix many checkstyle violations

Location:
trunk/src/org/openstreetmap/josm/data/cache
Files:
2 edited

Legend:

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

    r8487 r8509  
    7373        jcsLog.setLevel(Level.INFO);
    7474        jcsLog.setUseParentHandlers(false);
    75         //Logger.getLogger("org.apache.common").setUseParentHandlers(false);
    76         // we need a separate handler from Main's, as we  downgrade LEVEL.INFO to DEBUG level
     75        // we need a separate handler from Main's, as we downgrade LEVEL.INFO to DEBUG level
    7776        jcsLog.addHandler(new Handler() {
    7877            @Override
     
    10099        });
    101100
    102 
    103         CompositeCacheManager cm  = CompositeCacheManager.getUnconfiguredInstance();
    104101        // this could be moved to external file
    105102        Properties props = new Properties();
    106103        // these are default common to all cache regions
    107104        // use of auxiliary cache and sizing of the caches is done with giving proper geCache(...) params
    108         props.setProperty("jcs.default.cacheattributes",                            org.apache.commons.jcs.engine.CompositeCacheAttributes.class.getCanonicalName());
    109         props.setProperty("jcs.default.cacheattributes.MaxObjects",                 DEFAULT_MAX_OBJECTS_IN_MEMORY.get().toString());
    110         props.setProperty("jcs.default.cacheattributes.UseMemoryShrinker",          "true");
    111         props.setProperty("jcs.default.cacheattributes.DiskUsagePatternName",       "UPDATE"); // store elements on disk on put
    112         props.setProperty("jcs.default.elementattributes",                          CacheEntryAttributes.class.getCanonicalName());
    113         props.setProperty("jcs.default.elementattributes.IsEternal",                "false");
    114         props.setProperty("jcs.default.elementattributes.MaxLife",                  Long.toString(maxObjectTTL));
    115         props.setProperty("jcs.default.elementattributes.IdleTime",                 Long.toString(maxObjectTTL));
    116         props.setProperty("jcs.default.elementattributes.IsSpool",                  "true");
     105        props.setProperty("jcs.default.cacheattributes",                      CompositeCacheAttributes.class.getCanonicalName());
     106        props.setProperty("jcs.default.cacheattributes.MaxObjects",           DEFAULT_MAX_OBJECTS_IN_MEMORY.get().toString());
     107        props.setProperty("jcs.default.cacheattributes.UseMemoryShrinker",    "true");
     108        props.setProperty("jcs.default.cacheattributes.DiskUsagePatternName", "UPDATE"); // store elements on disk on put
     109        props.setProperty("jcs.default.elementattributes",                    CacheEntryAttributes.class.getCanonicalName());
     110        props.setProperty("jcs.default.elementattributes.IsEternal",          "false");
     111        props.setProperty("jcs.default.elementattributes.MaxLife",            Long.toString(maxObjectTTL));
     112        props.setProperty("jcs.default.elementattributes.IdleTime",           Long.toString(maxObjectTTL));
     113        props.setProperty("jcs.default.elementattributes.IsSpool",            "true");
     114        CompositeCacheManager cm = CompositeCacheManager.getUnconfiguredInstance();
    117115        cm.configure(props);
    118116        cacheManager = cm;
    119 
    120117    }
    121118
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r8485 r8509  
    288288            expires = Math.min(expires, attributes.getCreateTime() + EXPIRE_TIME_SERVER_LIMIT);
    289289            if (now > expires) {
    290                 log.log(Level.FINE, "JCS - Object {0} has expired -> valid to {1}, now is: {2}", new Object[]{getUrl(), Long.toString(expires), Long.toString(now)});
     290                log.log(Level.FINE, "JCS - Object {0} has expired -> valid to {1}, now is: {2}",
     291                        new Object[]{getUrl(), Long.toString(expires), Long.toString(now)});
    291292                return false;
    292293            }
Note: See TracChangeset for help on using the changeset viewer.