Polish: to get rid unnecessary array creation
This commit is contained in:
parent
bf0308b0cf
commit
d1ccecd021
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")) {
|
||||
|
|
Loading…
Reference in New Issue