enum flags now also take lovercase names

This commit is contained in:
Redecouverte 2011-02-28 18:51:37 +01:00
parent a8b54757e9
commit 8f9bfcf474
2 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,7 @@ public boolean setValue(String newValue) {
this.value = null;
} else {
try {
newValue = newValue.toUpperCase();
this.value = RegionGroup.valueOf(newValue);
} catch (Exception e) {
this.value = null;

View File

@ -54,6 +54,7 @@ public boolean setValue(String newValue) {
this.value = null;
} else {
try {
newValue = newValue.toUpperCase();
this.value = State.valueOf(newValue);
} catch (Exception e) {
this.value = null;