Browse Source

jfinal 3.6

James 7 years ago
parent
commit
3847e774db
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/main/java/com/jfinal/aop/AopFactory.java

+ 2 - 3
src/main/java/com/jfinal/aop/AopFactory.java

@@ -24,8 +24,7 @@ public class AopFactory {
 	public <T> T get(Class<T> targetClass) {
 		try {
 			return get(targetClass, injectDepth);
-		}
-		catch (ReflectiveOperationException e) {
+		} catch (ReflectiveOperationException e) {
 			throw new RuntimeException(e);
 		}
 	}
@@ -49,7 +48,7 @@ public class AopFactory {
 		
 		ret = singletonCache.get(targetClass);
 		if (ret == null) {
-			synchronized (targetClass) {
+			synchronized (this) {
 				ret = singletonCache.get(targetClass);
 				if (ret == null) {
 					ret = createObject(targetClass);