Skip to content

Commit b3237f3

Browse files
committed
Polishing
1 parent fd68fb1 commit b3237f3

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/groovy/GroovyBeanDefinitionReader.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -310,24 +310,21 @@ public AbstractBeanDefinition bean(Class<?> type, Object...args) {
310310
GroovyBeanDefinitionWrapper current = this.currentBeanDefinition;
311311
try {
312312
Closure callable = null;
313-
Collection constructorArgs = null;
313+
Collection<Object> constructorArgs = null;
314314
if (!ObjectUtils.isEmpty(args)) {
315315
int index = args.length;
316316
Object lastArg = args[index - 1];
317317
if (lastArg instanceof Closure) {
318318
callable = (Closure) lastArg;
319319
index--;
320320
}
321-
if (index > -1) {
322-
constructorArgs = resolveConstructorArguments(args, 0, index);
323-
}
321+
constructorArgs = resolveConstructorArguments(args, 0, index);
324322
}
325323
this.currentBeanDefinition = new GroovyBeanDefinitionWrapper(null, type, constructorArgs);
326324
if (callable != null) {
327325
callable.call(this.currentBeanDefinition);
328326
}
329327
return this.currentBeanDefinition.getBeanDefinition();
330-
331328
}
332329
finally {
333330
this.currentBeanDefinition = current;
@@ -810,7 +807,7 @@ public boolean add(Object value) {
810807
return retVal;
811808
}
812809

813-
public boolean addAll(Collection values) {
810+
public boolean addAll(Collection<?> values) {
814811
boolean retVal = (Boolean) InvokerHelper.invokeMethod(this.propertyValue, "addAll", values);
815812
for (Object value : values) {
816813
updateDeferredProperties(value);

spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultExchangeStrategiesBuilder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* Default implementation of {@link ExchangeStrategies.Builder}.
3030
*
3131
* @author Arjen Poutsma
32+
* @author Brian Clozel
3233
* @since 5.0
3334
*/
3435
final class DefaultExchangeStrategiesBuilder implements ExchangeStrategies.Builder {
@@ -79,7 +80,6 @@ private static class DefaultExchangeStrategies implements ExchangeStrategies {
7980

8081
private final List<HttpMessageWriter<?>> writers;
8182

82-
8383
public DefaultExchangeStrategies(ClientCodecConfigurer codecConfigurer) {
8484
this.codecConfigurer = codecConfigurer;
8585
this.readers = unmodifiableCopy(this.codecConfigurer.getReaders());
@@ -90,9 +90,8 @@ private static <T> List<T> unmodifiableCopy(List<? extends T> list) {
9090
return Collections.unmodifiableList(new ArrayList<>(list));
9191
}
9292

93-
94-
@Override
9593
@Deprecated
94+
@Override
9695
public Builder mutate() {
9796
return new DefaultExchangeStrategiesBuilder(this);
9897
}

0 commit comments

Comments
 (0)