aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/cgBase.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/cgBase.java b/main/src/cgeo/geocaching/cgBase.java
index e0b4281..15382ca 100644
--- a/main/src/cgeo/geocaching/cgBase.java
+++ b/main/src/cgeo/geocaching/cgBase.java
@@ -685,7 +685,10 @@ public class cgBase {
final Matcher matcherCode = patternCode.matcher(row);
while (matcherCode.find()) {
if (matcherCode.groupCount() > 0) {
- cache.geocode = matcherCode.group(1).toUpperCase();
+ // The String constructor is necessary as long as the pattern matching doesn't use the
+ // methods from BaseUtil. Otherwise every geocode holds the complete page in memory
+ // FIXME: Use BaseUtil for parsing
+ cache.geocode = new String(matcherCode.group(1).toUpperCase().trim());
}
}
} catch (Exception e) {
@@ -1609,7 +1612,8 @@ public class cgBase {
if (matcher.find())
{
- Settings.setGcCustomDate(matcher.group(1));
+ // FIXME: Use BaseUtils for pattern matching to avoid huge Strings
+ Settings.setGcCustomDate(new String(matcher.group(1).trim()));
}
}