Changeset 12981 in josm


Ignore:
Timestamp:
2017-10-11T13:12:20+02:00 (7 days ago)
Author:
bastiK
Message:

update field name to be more clear

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/preferences/CachingProperty.java

    r12180 r12981  
    1515
    1616    private T cache;
    17     private boolean cacheActive;
     17    private boolean cacheValid;
    1818    private final AbstractProperty<T> toCache;
    1919
     
    3030    @Override
    3131    public synchronized T get() {
    32         if (!cacheActive) {
     32        if (!cacheValid) {
    3333            cache = toCache.get();
    34             cacheActive = true;
     34            cacheValid = true;
    3535        }
    3636        return cache;
     
    4444    @Override
    4545    public synchronized void valueChanged(ValueChangeEvent<? extends T> e) {
    46         cacheActive = false;
     46        cacheValid = false;
    4747    }
    4848}
Note: See TracChangeset for help on using the changeset viewer.