Added check for null string to fix crash (Issue# 312)

This commit is contained in:
ArsenalNut
2011-09-19 02:12:45 +00:00
parent 2ce4e24b6a
commit f0532e8f24

View File

@@ -91,6 +91,7 @@ public interface Constant {
Stack;
public static Zone smartValueOf(final String value) {
if (value == null) { return null; }
if ("All".equals(value)) { return null; }
String valToCompate = value.trim();
for (Zone v : Zone.values()) { if (v.name().compareToIgnoreCase(valToCompate) == 0) { return v; } }