From 53936c7ee6654a525075b03e1b4c8ddbfbcd4ef5 Mon Sep 17 00:00:00 2001 From: Gerald Barker Date: Fri, 2 Sep 2011 23:19:51 +0100 Subject: First commit of Apache Commons String & Date functions and required, and refactor of code to use them. --- src/cgeo/geocaching/cgeocoords.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cgeo/geocaching/cgeocoords.java') diff --git a/src/cgeo/geocaching/cgeocoords.java b/src/cgeo/geocaching/cgeocoords.java index 229b3a6..15944ae 100644 --- a/src/cgeo/geocaching/cgeocoords.java +++ b/src/cgeo/geocaching/cgeocoords.java @@ -3,6 +3,8 @@ package cgeo.geocaching; import java.util.ArrayList; import java.util.HashMap; +import org.apache.commons.lang3.StringUtils; + import android.app.Dialog; import android.os.Bundle; import android.text.Editable; @@ -274,7 +276,7 @@ public class cgeocoords extends Dialog { public void onClick(View v) { Button e = (Button) v; CharSequence text = e.getText(); - if (text == null || text.length() == 0) { + if (StringUtils.isBlank(text)) { return; } switch (text.charAt(0)) { -- cgit v1.1