Changeset 12981 in josm
- Timestamp:
- 2017-10-11T13:12:20+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/preferences/CachingProperty.java
r12180 r12981 15 15 16 16 private T cache; 17 private boolean cache Active;17 private boolean cacheValid; 18 18 private final AbstractProperty<T> toCache; 19 19 … … 30 30 @Override 31 31 public synchronized T get() { 32 if (!cache Active) {32 if (!cacheValid) { 33 33 cache = toCache.get(); 34 cache Active= true;34 cacheValid = true; 35 35 } 36 36 return cache; … … 44 44 @Override 45 45 public synchronized void valueChanged(ValueChangeEvent<? extends T> e) { 46 cache Active= false;46 cacheValid = false; 47 47 } 48 48 }
Note:
See TracChangeset
for help on using the changeset viewer.