diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-01-05 11:03:58 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-01-05 11:03:58 +0100 |
| commit | 68069dc6982f3a2c87690eb9171f5820064ebbab (patch) | |
| tree | 0be0bf26f5d3d272224d048d82fc32abef37a188 /main/src/cgeo/geocaching/LogEntry.java | |
| parent | 656e92453fcf0e9d7da137cd4c3551b6530e9969 (diff) | |
| download | cgeo-68069dc6982f3a2c87690eb9171f5820064ebbab.zip cgeo-68069dc6982f3a2c87690eb9171f5820064ebbab.tar.gz cgeo-68069dc6982f3a2c87690eb9171f5820064ebbab.tar.bz2 | |
fix #2328: Have a wrapper around Matcher to avoid String related memory
issues
Diffstat (limited to 'main/src/cgeo/geocaching/LogEntry.java')
| -rw-r--r-- | main/src/cgeo/geocaching/LogEntry.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/LogEntry.java b/main/src/cgeo/geocaching/LogEntry.java index b625bb5..1cb3de3 100644 --- a/main/src/cgeo/geocaching/LogEntry.java +++ b/main/src/cgeo/geocaching/LogEntry.java @@ -2,6 +2,7 @@ package cgeo.geocaching; import cgeo.geocaching.enumerations.LogType; import cgeo.geocaching.utils.DateUtils; +import cgeo.geocaching.utils.MatcherWrapper; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -10,7 +11,6 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; import java.util.List; -import java.util.regex.Matcher; import java.util.regex.Pattern; public final class LogEntry { @@ -107,7 +107,7 @@ public final class LogEntry { */ public String getDisplayText() { if (Settings.getPlainLogs()) { - Matcher matcher = PATTERN_REMOVE_COLORS.matcher(log); + MatcherWrapper matcher = new MatcherWrapper(PATTERN_REMOVE_COLORS, log); return matcher.replaceAll(""); } return log; |
