Bug: cleanup policy compact delete could be without space (#829)
This commit is contained in:
parent
5302c3e47f
commit
859e9fb88d
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ import java.util.Arrays;
|
|||
public enum CleanupPolicy {
|
||||
DELETE("delete"),
|
||||
COMPACT("compact"),
|
||||
COMPACT_DELETE("compact, delete"),
|
||||
COMPACT_DELETE("compact,delete"),
|
||||
UNKNOWN("unknown");
|
||||
|
||||
private final String cleanUpPolicy;
|
||||
|
@ -21,7 +21,7 @@ public enum CleanupPolicy {
|
|||
|
||||
public static CleanupPolicy fromString(String string) {
|
||||
return Arrays.stream(CleanupPolicy.values())
|
||||
.filter(v -> v.cleanUpPolicy.equals(string))
|
||||
.filter(v -> v.cleanUpPolicy.equals(string.replace(" ", "")))
|
||||
.findFirst()
|
||||
.orElseThrow(() ->
|
||||
new IllegalEntityStateException("Unknown cleanup policy value: " + string));
|
||||
|
|
Loading…
Add table
Reference in a new issue