Skip to content

Commit 094ff88

Browse files
committed
Polishing
1 parent 44f79f9 commit 094ff88

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 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.
@@ -61,7 +61,7 @@ public TypedStringValue(String value) {
6161
* @param value the String value
6262
* @param targetType the type to convert to
6363
*/
64-
public TypedStringValue(String value, Class targetType) {
64+
public TypedStringValue(String value, Class<?> targetType) {
6565
setValue(value);
6666
setTargetType(targetType);
6767
}
@@ -101,15 +101,15 @@ public String getValue() {
101101
* for example in BeanFactoryPostProcessors.
102102
* @see PropertyPlaceholderConfigurer
103103
*/
104-
public void setTargetType(Class targetType) {
104+
public void setTargetType(Class<?> targetType) {
105105
Assert.notNull(targetType, "'targetType' must not be null");
106106
this.targetType = targetType;
107107
}
108108

109109
/**
110110
* Return the type to convert to.
111111
*/
112-
public Class getTargetType() {
112+
public Class<?> getTargetType() {
113113
Object targetTypeValue = this.targetType;
114114
if (!(targetTypeValue instanceof Class)) {
115115
throw new IllegalStateException("Typed String value does not carry a resolved target type");
@@ -153,11 +153,11 @@ public boolean hasTargetType() {
153153
* @return the resolved type to convert to
154154
* @throws ClassNotFoundException if the type cannot be resolved
155155
*/
156-
public Class resolveTargetType(ClassLoader classLoader) throws ClassNotFoundException {
156+
public Class<?> resolveTargetType(ClassLoader classLoader) throws ClassNotFoundException {
157157
if (this.targetType == null) {
158158
return null;
159159
}
160-
Class resolvedClass = ClassUtils.forName(getTargetTypeName(), classLoader);
160+
Class<?> resolvedClass = ClassUtils.forName(getTargetTypeName(), classLoader);
161161
this.targetType = resolvedClass;
162162
return resolvedClass;
163163
}

spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionValueResolver.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 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.
@@ -128,7 +128,7 @@ else if (value instanceof BeanDefinition) {
128128
else if (value instanceof ManagedArray) {
129129
// May need to resolve contained runtime references.
130130
ManagedArray array = (ManagedArray) value;
131-
Class elementType = array.resolvedElementType;
131+
Class<?> elementType = array.resolvedElementType;
132132
if (elementType == null) {
133133
String elementTypeName = array.getElementTypeName();
134134
if (StringUtils.hasText(elementTypeName)) {
@@ -271,7 +271,7 @@ private Object resolveInnerBean(Object argName, String innerBeanName, BeanDefini
271271
Object innerBean = this.beanFactory.createBean(actualInnerBeanName, mbd, null);
272272
this.beanFactory.registerContainedBean(actualInnerBeanName, this.beanName);
273273
if (innerBean instanceof FactoryBean) {
274-
boolean synthetic = (mbd != null && mbd.isSynthetic());
274+
boolean synthetic = mbd.isSynthetic();
275275
return this.beanFactory.getObjectFromFactoryBean((FactoryBean) innerBean, actualInnerBeanName, !synthetic);
276276
}
277277
else {
@@ -335,7 +335,7 @@ private Object resolveReference(Object argName, RuntimeBeanReference ref) {
335335
/**
336336
* For each element in the managed array, resolve reference if necessary.
337337
*/
338-
private Object resolveManagedArray(Object argName, List<?> ml, Class elementType) {
338+
private Object resolveManagedArray(Object argName, List<?> ml, Class<?> elementType) {
339339
Object resolved = Array.newInstance(elementType, ml.size());
340340
for (int i = 0; i < ml.size(); i++) {
341341
Array.set(resolved, i,

0 commit comments

Comments
 (0)