Skip to content

Commit 3581806

Browse files
resource type case-insensitive validation
1 parent c133390 commit 3581806

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/src/main/java/org/apache/cloudstack/api/ApiCommandResourceType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public String toString() {
127127
}
128128

129129
public static ApiCommandResourceType fromString(String value) {
130-
if (StringUtils.isNotEmpty(value) && EnumUtils.isValidEnum(ApiCommandResourceType.class, value)) {
131-
return valueOf(value);
130+
if (StringUtils.isNotBlank(value) && EnumUtils.isValidEnumIgnoreCase(ApiCommandResourceType.class, value)) {
131+
return EnumUtils.getEnumIgnoreCase(ApiCommandResourceType.class, value);
132132
}
133133
return null;
134134
}

0 commit comments

Comments
 (0)