diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2015-01-07 09:41:21 +0100 |
---|---|---|
committer | Samuel Tardieu <sam@rfc1149.net> | 2015-01-07 09:41:21 +0100 |
commit | fa306fb7aefb8385b504cd31d5ef5a7a370df669 (patch) | |
tree | 3a0325539a5b020f019d7e7dadab51059ac43101 | |
parent | 19510458cf25009ccf966250eaa2eba937c635ed (diff) | |
parent | b79dc8360b06932f34f8a74b40899e7a429c014c (diff) | |
download | cgeo-fa306fb7aefb8385b504cd31d5ef5a7a370df669.zip cgeo-fa306fb7aefb8385b504cd31d5ef5a7a370df669.tar.gz cgeo-fa306fb7aefb8385b504cd31d5ef5a7a370df669.tar.bz2 |
Merge branch 'release' into upstream
-rw-r--r-- | main/res/values/changelog_release.xml | 1 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/connector/gc/GCParser.java | 6 |
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); |