aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/res/values/changelog_release.xml1
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCParser.java6
2 files changed, 4 insertions, 3 deletions
diff --git a/main/res/values/changelog_release.xml b/main/res/values/changelog_release.xml
index a5681a6..58f1c91 100644
--- a/main/res/values/changelog_release.xml
+++ b/main/res/values/changelog_release.xml
@@ -13,6 +13,7 @@
· Fix: Menu for scanning trackable and geocache codes wrongly hidden\n
· Fix: Recognize Sygic voucher edition\n
· Fix: Update locally stored GCVote when sending over network\n
+ · Fix: Clearing of a cache only attribute is not recorded into the database\n
\n
\n
<b>Known Limitations/Bugs:</b>\n
diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java
index 8371120..ab11df6 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCParser.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java
@@ -579,11 +579,11 @@ public abstract class GCParser {
// cache attributes
try {
+ final ArrayList<String> attributes = new ArrayList<>();
final String attributesPre = TextUtils.getMatch(page, GCConstants.PATTERN_ATTRIBUTES, true, null);
- if (null != attributesPre) {
+ if (attributesPre != null) {
final MatcherWrapper matcherAttributesInside = new MatcherWrapper(GCConstants.PATTERN_ATTRIBUTESINSIDE, attributesPre);
- final ArrayList<String> attributes = new ArrayList<>();
while (matcherAttributesInside.find()) {
if (matcherAttributesInside.groupCount() > 1 && !matcherAttributesInside.group(2).equalsIgnoreCase("blank")) {
// by default, use the tooltip of the attribute
@@ -601,8 +601,8 @@ public abstract class GCParser {
attributes.add(attribute);
}
}
- cache.setAttributes(attributes);
}
+ cache.setAttributes(attributes);
} catch (final RuntimeException e) {
// failed to parse cache attributes
Log.w("GCParser.parseCache: Failed to parse cache attributes", e);