Browse Source

fixes formatting

pull/395/head
Spencer Gibb 7 years ago
parent
commit
bd138dac44
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 17
      spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/GenericScope.java

17
spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/GenericScope.java

@ -477,14 +477,15 @@ public class GenericScope implements Scope, BeanFactoryPostProcessor, @@ -477,14 +477,15 @@ public class GenericScope implements Scope, BeanFactoryPostProcessor,
return invocation.proceed();
}
Object proxy = getObject();
ReadWriteLock readWriteLock = scope.getLock(this.targetBeanName);
if (readWriteLock == null) {
if (logger.isDebugEnabled()) {
logger.debug("For bean with name [" + this.targetBeanName + "] there is no read write lock. Will create a new one to avoid NPE");
}
readWriteLock = new ReentrantReadWriteLock();
}
Lock lock = readWriteLock.readLock();
ReadWriteLock readWriteLock = scope.getLock(this.targetBeanName);
if (readWriteLock == null) {
if (logger.isDebugEnabled()) {
logger.debug("For bean with name [" + this.targetBeanName
+ "] there is no read write lock. Will create a new one to avoid NPE");
}
readWriteLock = new ReentrantReadWriteLock();
}
Lock lock = readWriteLock.readLock();
lock.lock();
try {
if (proxy instanceof Advised) {

Loading…
Cancel
Save