From 2c2ed7edd39cf46bdabe46e4d6bbfb8d35bc731d Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Sun, 27 Oct 2013 21:26:16 +0100 Subject: [PATCH] Polishing --- .../beans/factory/config/TypedStringValue.java | 8 ++++---- .../factory/support/BeanDefinitionValueResolver.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java index a9ff4fdbfb..a9099a1974 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -109,7 +109,7 @@ public class TypedStringValue implements BeanMetadataElement { /** * Return the type to convert to. */ - public Class getTargetType() { + public Class getTargetType() { Object targetTypeValue = this.targetType; if (!(targetTypeValue instanceof Class)) { throw new IllegalStateException("Typed String value does not carry a resolved target type"); @@ -153,11 +153,11 @@ public class TypedStringValue implements BeanMetadataElement { * @return the resolved type to convert to * @throws ClassNotFoundException if the type cannot be resolved */ - public Class resolveTargetType(ClassLoader classLoader) throws ClassNotFoundException { + public Class resolveTargetType(ClassLoader classLoader) throws ClassNotFoundException { if (this.targetType == null) { return null; } - Class resolvedClass = ClassUtils.forName(getTargetTypeName(), classLoader); + Class resolvedClass = ClassUtils.forName(getTargetTypeName(), classLoader); this.targetType = resolvedClass; return resolvedClass; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionValueResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionValueResolver.java index 4ee6d218fa..9640067784 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionValueResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionValueResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -128,7 +128,7 @@ class BeanDefinitionValueResolver { else if (value instanceof ManagedArray) { // May need to resolve contained runtime references. ManagedArray array = (ManagedArray) value; - Class elementType = array.resolvedElementType; + Class elementType = array.resolvedElementType; if (elementType == null) { String elementTypeName = array.getElementTypeName(); if (StringUtils.hasText(elementTypeName)) { @@ -271,7 +271,7 @@ class BeanDefinitionValueResolver { Object innerBean = this.beanFactory.createBean(actualInnerBeanName, mbd, null); this.beanFactory.registerContainedBean(actualInnerBeanName, this.beanName); if (innerBean instanceof FactoryBean) { - boolean synthetic = (mbd != null && mbd.isSynthetic()); + boolean synthetic = mbd.isSynthetic(); return this.beanFactory.getObjectFromFactoryBean((FactoryBean) innerBean, actualInnerBeanName, !synthetic); } else { @@ -335,7 +335,7 @@ class BeanDefinitionValueResolver { /** * For each element in the managed array, resolve reference if necessary. */ - private Object resolveManagedArray(Object argName, List ml, Class elementType) { + private Object resolveManagedArray(Object argName, List ml, Class elementType) { Object resolved = Array.newInstance(elementType, ml.size()); for (int i = 0; i < ml.size(); i++) { Array.set(resolved, i,