Polishing

This commit is contained in:
Juergen Hoeller
2019-12-01 00:41:53 +01:00
parent fd68fb115d
commit b3237f3eb6
2 changed files with 6 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -310,7 +310,7 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
GroovyBeanDefinitionWrapper current = this.currentBeanDefinition;
try {
Closure callable = null;
Collection constructorArgs = null;
Collection<Object> constructorArgs = null;
if (!ObjectUtils.isEmpty(args)) {
int index = args.length;
Object lastArg = args[index - 1];
@@ -318,16 +318,13 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
callable = (Closure) lastArg;
index--;
}
if (index > -1) {
constructorArgs = resolveConstructorArguments(args, 0, index);
}
constructorArgs = resolveConstructorArguments(args, 0, index);
}
this.currentBeanDefinition = new GroovyBeanDefinitionWrapper(null, type, constructorArgs);
if (callable != null) {
callable.call(this.currentBeanDefinition);
}
return this.currentBeanDefinition.getBeanDefinition();
}
finally {
this.currentBeanDefinition = current;
@@ -810,7 +807,7 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
return retVal;
}
public boolean addAll(Collection values) {
public boolean addAll(Collection<?> values) {
boolean retVal = (Boolean) InvokerHelper.invokeMethod(this.propertyValue, "addAll", values);
for (Object value : values) {
updateDeferredProperties(value);

View File

@@ -29,6 +29,7 @@ import org.springframework.http.codec.HttpMessageWriter;
* Default implementation of {@link ExchangeStrategies.Builder}.
*
* @author Arjen Poutsma
* @author Brian Clozel
* @since 5.0
*/
final class DefaultExchangeStrategiesBuilder implements ExchangeStrategies.Builder {
@@ -79,7 +80,6 @@ final class DefaultExchangeStrategiesBuilder implements ExchangeStrategies.Build
private final List<HttpMessageWriter<?>> writers;
public DefaultExchangeStrategies(ClientCodecConfigurer codecConfigurer) {
this.codecConfigurer = codecConfigurer;
this.readers = unmodifiableCopy(this.codecConfigurer.getReaders());
@@ -90,9 +90,8 @@ final class DefaultExchangeStrategiesBuilder implements ExchangeStrategies.Build
return Collections.unmodifiableList(new ArrayList<>(list));
}
@Override
@Deprecated
@Override
public Builder mutate() {
return new DefaultExchangeStrategiesBuilder(this);
}