We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2567bc6 commit 882bcbfCopy full SHA for 882bcbf
src/main/java/eatda/domain/store/District.java
@@ -41,8 +41,11 @@ public enum District {
41
}
42
43
public static District fromName(String name) {
44
+ if (name == null || name.isEmpty()) {
45
+ return ETC;
46
+ }
47
return Arrays.stream(District.values())
- .filter(district -> district.name.equals(name))
48
+ .filter(district -> district.name.equals(name.trim()))
49
.findFirst()
50
.orElse(ETC);
51
0 commit comments