Some simplifications of dynamic CA/Reconcilng using PartialCollection
This commit is contained in:
@@ -64,7 +64,7 @@ public class EnumValueParser implements ValueParser {
|
||||
|
||||
PartialCollection<String> values = this.values.get();
|
||||
|
||||
// If values is not known (null) then just assume the str is acceptable.
|
||||
// If values is not fully known then just assume the str is acceptable.
|
||||
if (values == null || !values.isComplete() || values.getElements().contains(str)) {
|
||||
return str;
|
||||
} else {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
*******************************************************************************/
|
||||
package org.springframework.ide.vscode.commons.util;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
@@ -132,4 +133,7 @@ public class PartialCollection<T> {
|
||||
return explanation;
|
||||
}
|
||||
|
||||
public PartialCollection<T> add(@SuppressWarnings("unchecked") T... values) {
|
||||
return addAll(Arrays.asList(values));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user