aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2012-01-31 07:32:40 +0100
committerBananeweizen <bananeweizen@gmx.de>2012-01-31 07:32:40 +0100
commitcff161c259ff85c603478a95e7dcd6c01d66e9e5 (patch)
tree7ac0788454a313ab2c90005e07178aeb3a539cc9 /main
parent7fba2c26fd9203eb9cde0997bca231b63f11c2c4 (diff)
downloadcgeo-cff161c259ff85c603478a95e7dcd6c01d66e9e5.zip
cgeo-cff161c259ff85c603478a95e7dcd6c01d66e9e5.tar.gz
cgeo-cff161c259ff85c603478a95e7dcd6c01d66e9e5.tar.bz2
fix #1071: FC with unknown container size
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/cgCache.java10
-rw-r--r--main/src/cgeo/geocaching/cgCoord.java2
-rw-r--r--main/src/cgeo/geocaching/files/LocParser.java2
3 files changed, 11 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/cgCache.java b/main/src/cgeo/geocaching/cgCache.java
index 432bd93..9fdaaaf 100644
--- a/main/src/cgeo/geocaching/cgCache.java
+++ b/main/src/cgeo/geocaching/cgCache.java
@@ -507,6 +507,9 @@ public class cgCache implements ICache {
@Override
public CacheSize getSize() {
+ if (size == null) {
+ return CacheSize.UNKNOWN;
+ }
return size;
}
@@ -986,7 +989,12 @@ public class cgCache implements ICache {
}
public void setSize(CacheSize size) {
- this.size = size;
+ if (size == null) {
+ this.size = CacheSize.UNKNOWN;
+ }
+ else {
+ this.size = size;
+ }
}
public void setDifficulty(float difficulty) {
diff --git a/main/src/cgeo/geocaching/cgCoord.java b/main/src/cgeo/geocaching/cgCoord.java
index 010fc22..0c5b5b5 100644
--- a/main/src/cgeo/geocaching/cgCoord.java
+++ b/main/src/cgeo/geocaching/cgCoord.java
@@ -20,7 +20,7 @@ public class cgCoord implements IBasicCache, IWaypoint {
private Geopoint coords = new Geopoint(0, 0);
private float difficulty = 0;
private float terrain = 0;
- private CacheSize size = null;
+ private CacheSize size = CacheSize.UNKNOWN;
public cgCoord() {
}
diff --git a/main/src/cgeo/geocaching/files/LocParser.java b/main/src/cgeo/geocaching/files/LocParser.java
index 38ddb80..7a8a674 100644
--- a/main/src/cgeo/geocaching/files/LocParser.java
+++ b/main/src/cgeo/geocaching/files/LocParser.java
@@ -125,7 +125,7 @@ public final class LocParser extends FileParser {
} else if (size == 8) {
pointCoord.setSize(CacheSize.SMALL);
} else {
- pointCoord.setSize(null);
+ pointCoord.setSize(CacheSize.UNKNOWN);
}
}