This commit is contained in:
Redkale
2017-11-23 08:56:40 +08:00
parent dddb2397c4
commit 6c11ef70d4

View File

@@ -777,7 +777,8 @@ public final class ResourceFactory {
this.listener = tn.startsWith("java.") || tn.startsWith("javax.") ? null : findListener(t, field.getType()); this.listener = tn.startsWith("java.") || tn.startsWith("javax.") ? null : findListener(t, field.getType());
} }
private static synchronized Method findListener(Class clazz, Class fieldType) { private static Method findListener(Class clazz, Class fieldType) {
synchronized (listenerMethods) {
Class loop = clazz; Class loop = clazz;
Method m = listenerMethods.get(clazz.getName() + "-" + fieldType.getName()); Method m = listenerMethods.get(clazz.getName() + "-" + fieldType.getName());
if (m != null) return m; if (m != null) return m;
@@ -798,6 +799,7 @@ public final class ResourceFactory {
return m; return m;
} }
} }
}
@FunctionalInterface @FunctionalInterface
public static interface ResourceLoader { public static interface ResourceLoader {