Polish: to get rid unnecessary array creation

This commit is contained in:
igor-suhorukov 2018-02-28 00:12:51 +03:00 committed by Juergen Hoeller
parent bf0308b0cf
commit d1ccecd021
3 changed files with 4 additions and 4 deletions

View File

@ -524,7 +524,7 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
Closure callable = (Closure) args[args.length - 1];
callable.setDelegate(this);
callable.setResolveStrategy(Closure.DELEGATE_FIRST);
callable.call(new Object[]{currentBeanDefinition});
callable.call(currentBeanDefinition);
}
GroovyBeanDefinitionWrapper beanDefinition = currentBeanDefinition;

View File

@ -55,8 +55,8 @@ import org.springframework.util.StringUtils;
*/
public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> implements JmsHeaderMapper {
private static final Set<Class<?>> SUPPORTED_PROPERTY_TYPES = new HashSet<>(Arrays.asList(new Class<?>[] {
Boolean.class, Byte.class, Double.class, Float.class, Integer.class, Long.class, Short.class, String.class}));
private static final Set<Class<?>> SUPPORTED_PROPERTY_TYPES = new HashSet<>(Arrays.asList(
Boolean.class, Byte.class, Double.class, Float.class, Integer.class, Long.class, Short.class, String.class));
@Override

View File

@ -174,7 +174,7 @@ public class ViewResolversBeanDefinitionParser implements BeanDefinitionParser {
beanDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
MutablePropertyValues values = beanDef.getPropertyValues();
List<Element> elements = DomUtils.getChildElementsByTagName(resolverElement, new String[] {"default-views"});
List<Element> elements = DomUtils.getChildElementsByTagName(resolverElement, "default-views");
if (!elements.isEmpty()) {
ManagedList<Object> list = new ManagedList<>();
for (Element element : DomUtils.getChildElementsByTagName(elements.get(0), "bean", "ref")) {