Use modern language features in tests
This commit is contained in:
@@ -85,8 +85,8 @@ public class GenericConversionService implements ConfigurableConversionService {
|
||||
@Override
|
||||
public void addConverter(Converter<?, ?> converter) {
|
||||
ResolvableType[] typeInfo = getRequiredTypeInfo(converter.getClass(), Converter.class);
|
||||
if (typeInfo == null && converter instanceof DecoratingProxy) {
|
||||
typeInfo = getRequiredTypeInfo(((DecoratingProxy) converter).getDecoratedClass(), Converter.class);
|
||||
if (typeInfo == null && converter instanceof DecoratingProxy decoratingProxy) {
|
||||
typeInfo = getRequiredTypeInfo(decoratingProxy.getDecoratedClass(), Converter.class);
|
||||
}
|
||||
if (typeInfo == null) {
|
||||
throw new IllegalArgumentException("Unable to determine source type <S> and target type <T> for your " +
|
||||
|
||||
@@ -85,8 +85,8 @@ final class SimpleAnnotationMetadataReadingVisitor extends ClassVisitor {
|
||||
if (supername != null && !isInterface(access)) {
|
||||
this.superClassName = toClassName(supername);
|
||||
}
|
||||
for (int i = 0; i < interfaces.length; i++) {
|
||||
this.interfaceNames.add(toClassName(interfaces[i]));
|
||||
for (String element : interfaces) {
|
||||
this.interfaceNames.add(toClassName(element));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user