Skip to content

Commit 782a94f

Browse files
committed
Merge pull request #27799 from izeye
* pr/27799: Polish Closes gh-27799
2 parents e822be5 + 49c4d31 commit 782a94f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,6 @@ private PropertyEditor getCustomEditor(@Nullable Class<?> requiredType) {
423423
if (editor == null) {
424424
// Find editor for superclass or interface.
425425
for (Map.Entry<Class<?>, PropertyEditor> entry : this.customEditors.entrySet()) {
426-
if (editor != null) {
427-
break;
428-
}
429426
Class<?> key = entry.getKey();
430427
if (key.isAssignableFrom(requiredType)) {
431428
editor = entry.getValue();
@@ -435,6 +432,9 @@ private PropertyEditor getCustomEditor(@Nullable Class<?> requiredType) {
435432
this.customEditorCache = new HashMap<>();
436433
}
437434
this.customEditorCache.put(requiredType, editor);
435+
if (editor != null) {
436+
break;
437+
}
438438
}
439439
}
440440
}

0 commit comments

Comments
 (0)