Skip to content

Commit a577f63

Browse files
committed
Polishing
1 parent b6677cc commit a577f63

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

spring-beans/src/main/java/org/springframework/beans/BeanUtils.java

Lines changed: 9 additions & 5 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-2020 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.
@@ -45,8 +45,11 @@
4545
* Static convenience methods for JavaBeans: for instantiating beans,
4646
* checking bean property types, copying bean properties, etc.
4747
*
48-
* <p>Mainly for use within the framework, but to some degree also
49-
* useful for application classes.
48+
* <p>Mainly for internal use within the framework, but to some degree also
49+
* useful for application classes. Consider
50+
* <a href="https://commons.apache.org/proper/commons-beanutils/">Apache Commons BeanUtils</a>,
51+
* <a href="https://hotelsdotcom.github.io/bull/">BULL - Bean Utils Light Library</a>,
52+
* or similar third-party frameworks for more comprehensive bean utilities.
5053
*
5154
* @author Rod Johnson
5255
* @author Juergen Hoeller
@@ -432,7 +435,8 @@ public static PropertyEditor findEditorByConvention(Class<?> targetType) {
432435
return null;
433436
}
434437
}
435-
String editorName = targetType.getName() + "Editor";
438+
String targetTypeName = targetType.getName();
439+
String editorName = targetTypeName + "Editor";
436440
try {
437441
Class<?> editorClass = cl.loadClass(editorName);
438442
if (!PropertyEditor.class.isAssignableFrom(editorClass)) {
@@ -448,7 +452,7 @@ public static PropertyEditor findEditorByConvention(Class<?> targetType) {
448452
catch (ClassNotFoundException ex) {
449453
if (logger.isDebugEnabled()) {
450454
logger.debug("No property editor [" + editorName + "] found for type " +
451-
targetType.getName() + " according to 'Editor' suffix convention");
455+
targetTypeName + " according to 'Editor' suffix convention");
452456
}
453457
unknownEditorTypes.add(targetType);
454458
return null;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class ReplaceOverride extends MethodOverride {
4848
*/
4949
public ReplaceOverride(String methodName, String methodReplacerBeanName) {
5050
super(methodName);
51-
Assert.notNull(methodName, "Method replacer bean name must not be null");
51+
Assert.notNull(methodReplacerBeanName, "Method replacer bean name must not be null");
5252
this.methodReplacerBeanName = methodReplacerBeanName;
5353
}
5454

0 commit comments

Comments
 (0)