aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/cgCache.java
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-04-20 20:16:40 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-04-20 22:14:19 +0200
commitb9b297a38accdd54641b325ece04f488bbf90fb8 (patch)
tree5ab47eb0f713148a86a03d7c14ee2223acbfb396 /main/src/cgeo/geocaching/cgCache.java
parentc91a817d13a8f68cc5b7399ba4cbe7cd16a4645b (diff)
downloadcgeo-b9b297a38accdd54641b325ece04f488bbf90fb8.zip
cgeo-b9b297a38accdd54641b325ece04f488bbf90fb8.tar.gz
cgeo-b9b297a38accdd54641b325ece04f488bbf90fb8.tar.bz2
Refactoring: cleanup control flow
Diffstat (limited to 'main/src/cgeo/geocaching/cgCache.java')
-rw-r--r--main/src/cgeo/geocaching/cgCache.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/main/src/cgeo/geocaching/cgCache.java b/main/src/cgeo/geocaching/cgCache.java
index f95fb2c..9dfaa24 100644
--- a/main/src/cgeo/geocaching/cgCache.java
+++ b/main/src/cgeo/geocaching/cgCache.java
@@ -394,15 +394,9 @@ public class cgCache implements ICache, IWaypoint {
if (StringUtils.isBlank(guid)) {
return false;
}
- Pattern patternOk = Pattern.compile(guid, Pattern.CASE_INSENSITIVE);
- Matcher matcherOk = patternOk.matcher(page);
- if (matcherOk.find()) {
- Log.i("cgCache.isGuidContainedInPage: guid '" + guid + "' found");
- return true;
- } else {
- Log.i("cgCache.isGuidContainedInPage: guid '" + guid + "' not found");
- return false;
- }
+ final Boolean found = Pattern.compile(guid, Pattern.CASE_INSENSITIVE).matcher(page).find();
+ Log.i("cgCache.isGuidContainedInPage: guid '" + guid + "' " + (found ? "" : "not ") + "found");
+ return found;
}
public boolean isEventCache() {