aboutsummaryrefslogtreecommitdiffstats
path: root/src/cgeo/geocaching/cgWaypoint.java
diff options
context:
space:
mode:
authorBananeweizen <Bananeweizen@gmx.de>2011-09-03 11:44:37 -0700
committerBananeweizen <Bananeweizen@gmx.de>2011-09-03 11:44:37 -0700
commit5878215750b36147e31d4e44d39f5cee5a686a24 (patch)
tree05ed634bef7aa97c6aef53dca0bae8947b790669 /src/cgeo/geocaching/cgWaypoint.java
parent1ca5b0ddbe8ecaa67b1606f386ae398c0bf8da10 (diff)
parent5d6cd5f76c3682f70e4fa18182849fb2110a6aca (diff)
downloadcgeo-5878215750b36147e31d4e44d39f5cee5a686a24.zip
cgeo-5878215750b36147e31d4e44d39f5cee5a686a24.tar.gz
cgeo-5878215750b36147e31d4e44d39f5cee5a686a24.tar.bz2
Merge pull request #359 from gezb/301
Fix for issue #301 - include Apache commons lang library
Diffstat (limited to 'src/cgeo/geocaching/cgWaypoint.java')
-rw-r--r--src/cgeo/geocaching/cgWaypoint.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/cgeo/geocaching/cgWaypoint.java b/src/cgeo/geocaching/cgWaypoint.java
index 7746c2c..6b437f6 100644
--- a/src/cgeo/geocaching/cgWaypoint.java
+++ b/src/cgeo/geocaching/cgWaypoint.java
@@ -2,6 +2,8 @@ package cgeo.geocaching;
import java.util.ArrayList;
+import org.apache.commons.lang3.StringUtils;
+
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.widget.TextView;
@@ -32,22 +34,22 @@ public class cgWaypoint {
}
public void merge(final cgWaypoint old) {
- if (prefix == null || prefix.length() == 0) {
+ if (StringUtils.isBlank(prefix)) {
prefix = old.prefix;
}
- if (lookup == null || lookup.length() == 0) {
+ if (StringUtils.isBlank(lookup)) {
lookup = old.lookup;
}
- if (name == null || name.length() == 0) {
+ if (StringUtils.isBlank(name)) {
name = old.name;
}
- if (latlon == null || latlon.length() == 0) {
+ if (StringUtils.isBlank(latlon)) {
latlon = old.latlon;
}
- if (latitudeString == null || latitudeString.length() == 0) {
+ if (StringUtils.isBlank(latitudeString)) {
latitudeString = old.latitudeString;
}
- if (longitudeString == null || longitudeString.length() == 0) {
+ if (StringUtils.isBlank(longitudeString)) {
longitudeString = old.longitudeString;
}
if (latitude == null) {
@@ -56,7 +58,7 @@ public class cgWaypoint {
if (longitude == null) {
longitude = old.longitude;
}
- if (note == null || note.length() == 0) {
+ if (StringUtils.isBlank(note)) {
note = old.note;
}
if (note != null && old.note != null) {