Browse Source

Merge pull request #27799 from izeye

* pr/27799:
  Polish

Closes gh-27799
pull/27818/head
Stephane Nicoll 4 years ago
parent
commit
782a94fd25
  1. 6
      spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java

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

@ -423,9 +423,6 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry { @@ -423,9 +423,6 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
if (editor == null) {
// Find editor for superclass or interface.
for (Map.Entry<Class<?>, PropertyEditor> entry : this.customEditors.entrySet()) {
if (editor != null) {
break;
}
Class<?> key = entry.getKey();
if (key.isAssignableFrom(requiredType)) {
editor = entry.getValue();
@ -435,6 +432,9 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry { @@ -435,6 +432,9 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
this.customEditorCache = new HashMap<>();
}
this.customEditorCache.put(requiredType, editor);
if (editor != null) {
break;
}
}
}
}

Loading…
Cancel
Save