Polish
This commit is contained in:
@@ -38,7 +38,7 @@ public class EnumValueProvider implements ValueProvider {
|
||||
public List<CompletionProposal> complete(MethodParameter parameter, CompletionContext completionContext, String[] hints) {
|
||||
List<CompletionProposal> result = new ArrayList<>();
|
||||
for (Object v : parameter.getParameterType().getEnumConstants()) {
|
||||
Enum e = (Enum) v;
|
||||
Enum<?> e = (Enum<?>) v;
|
||||
String prefix = completionContext.currentWordUpToCursor();
|
||||
if (prefix == null) {
|
||||
prefix = "";
|
||||
|
||||
@@ -380,7 +380,7 @@ public class StandardParameterResolver implements ParameterResolver {
|
||||
List<CompletionProposal> result = new ArrayList<>();
|
||||
|
||||
Object value = convertRawValue(parameterRawValue, methodParameter);
|
||||
if (value instanceof Collection && ((Collection) value).size() == arity
|
||||
if (value instanceof Collection && ((Collection<?>) value).size() == arity
|
||||
|| (ObjectUtils.isArray(value) && Array.getLength(value) == arity)) {
|
||||
// We're done already
|
||||
return result;
|
||||
|
||||
@@ -51,7 +51,7 @@ public class CommandValueProviderTest {
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
MockitoAnnotations.openMocks(this);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user