diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2013-04-06 21:48:25 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2013-04-06 21:48:25 +0200 |
| commit | 990b75b58d3c2d274028a3253f28364ee115a460 (patch) | |
| tree | 4f73a344420dd0176195fe1cc497ceb9555f2ac7 /main/src/cgeo/geocaching/Geocache.java | |
| parent | e3c3b9bb066db079ac293052bc5dbcf2ba6f9bb4 (diff) | |
| download | cgeo-990b75b58d3c2d274028a3253f28364ee115a460.zip cgeo-990b75b58d3c2d274028a3253f28364ee115a460.tar.gz cgeo-990b75b58d3c2d274028a3253f28364ee115a460.tar.bz2 | |
refactoring: prefer StringUtils.defaultIfBlank over an explicit test
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
| -rw-r--r-- | main/src/cgeo/geocaching/Geocache.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java index 96bb2fe..4b78e4d 100644 --- a/main/src/cgeo/geocaching/Geocache.java +++ b/main/src/cgeo/geocaching/Geocache.java @@ -711,10 +711,7 @@ public class Geocache implements ICache, IWaypoint { public String getPersonalNote() { // non premium members have no personal notes, premium members have an empty string by default. // map both to null, so other code doesn't need to differentiate - if (StringUtils.isBlank(personalNote)) { - return null; - } - return personalNote; + return StringUtils.defaultIfBlank(personalNote, null); } public boolean supportsUserActions() { |
