aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Geocache.java
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2014-01-03 15:59:04 +0100
committerSamuel Tardieu <sam@rfc1149.net>2014-01-03 15:59:50 +0100
commite9e7e21f155fa3f547d7acc8df6fb5ba1692a219 (patch)
treec54ee729f5c2edb635cce5cd914466cd70631eb3 /main/src/cgeo/geocaching/Geocache.java
parentdd68dcbc2fa4adc621d932ad1befe89eea65d15e (diff)
downloadcgeo-e9e7e21f155fa3f547d7acc8df6fb5ba1692a219.zip
cgeo-e9e7e21f155fa3f547d7acc8df6fb5ba1692a219.tar.gz
cgeo-e9e7e21f155fa3f547d7acc8df6fb5ba1692a219.tar.bz2
fix #3494: EC attributes disappear on refresh
The lazy loading of attributes appeared after they had been removed from the database.
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
-rw-r--r--main/src/cgeo/geocaching/Geocache.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java
index 840e5de..a8662a2 100644
--- a/main/src/cgeo/geocaching/Geocache.java
+++ b/main/src/cgeo/geocaching/Geocache.java
@@ -117,13 +117,13 @@ public class Geocache implements ICache, IWaypoint {
private int votes = 0;
private float myVote = 0; // valid ratings are larger than zero
private int inventoryItems = 0;
- private final List<String> attributes = new LazyInitializedList<String>() {
+ private final LazyInitializedList<String> attributes = new LazyInitializedList<String>() {
@Override
public List<String> call() {
return DataStore.loadAttributes(geocode);
}
};
- private final List<Waypoint> waypoints = new LazyInitializedList<Waypoint>() {
+ private final LazyInitializedList<Waypoint> waypoints = new LazyInitializedList<Waypoint>() {
@Override
public List<Waypoint> call() {
return DataStore.loadWaypoints(geocode);
@@ -766,7 +766,7 @@ public class Geocache implements ICache, IWaypoint {
@Override
public List<String> getAttributes() {
- return attributes;
+ return attributes.getUnderlyingList();
}
@Override
@@ -989,7 +989,7 @@ public class Geocache implements ICache, IWaypoint {
* @return always non <code>null</code>
*/
public List<Waypoint> getWaypoints() {
- return waypoints;
+ return waypoints.getUnderlyingList();
}
/**