+ fix various minor bugs (reported by findBugs)
This commit is contained in:
@@ -154,7 +154,7 @@ public class GemfireTemplate extends GemfireAccessor {
|
||||
* Invocation handler that suppresses close calls on GemFire Regions.
|
||||
* @see Region#close()
|
||||
*/
|
||||
private class CloseSuppressingInvocationHandler implements InvocationHandler {
|
||||
private static class CloseSuppressingInvocationHandler implements InvocationHandler {
|
||||
|
||||
private final Region<?, ?> target;
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ public class GemfireTransactionManager extends AbstractPlatformTransactionManage
|
||||
|
||||
@Override
|
||||
protected void doCommit(DefaultTransactionStatus status) throws TransactionException {
|
||||
CacheTransactionObject txObject = (CacheTransactionObject) status.getTransaction();
|
||||
//CacheTransactionObject txObject = (CacheTransactionObject) status.getTransaction();
|
||||
if (status.isDebug()) {
|
||||
logger.debug("Committing Gemfire local transaction on Cache [" + cache + "]");
|
||||
}
|
||||
@@ -145,7 +145,7 @@ public class GemfireTransactionManager extends AbstractPlatformTransactionManage
|
||||
|
||||
@Override
|
||||
protected void doRollback(DefaultTransactionStatus status) throws TransactionException {
|
||||
CacheTransactionObject txObject = (CacheTransactionObject) status.getTransaction();
|
||||
//CacheTransactionObject txObject = (CacheTransactionObject) status.getTransaction();
|
||||
if (status.isDebug()) {
|
||||
logger.debug("Rolling back Cache local transaction for [" + cache + "]");
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ import com.gemstone.gemfire.cache.Declarable;
|
||||
*/
|
||||
public class WiringDeclarableSupport extends DeclarableSupport {
|
||||
|
||||
private final String BEAN_NAME_PROP = "bean-name";
|
||||
private static final String BEAN_NAME_PROP = "bean-name";
|
||||
|
||||
@Override
|
||||
protected void initInstance(Properties props) {
|
||||
|
||||
@@ -19,6 +19,8 @@ package org.springframework.data.gemfire.serialization;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
@@ -81,9 +83,13 @@ public class AsmInstantiatorGenerator implements InstantiatorGenerator, Opcodes
|
||||
this(AsmInstantiatorGenerator.class.getClassLoader());
|
||||
}
|
||||
|
||||
public AsmInstantiatorGenerator(ClassLoader classLoader) {
|
||||
public AsmInstantiatorGenerator(final ClassLoader classLoader) {
|
||||
Assert.notNull(classLoader);
|
||||
this.classLoader = new BytecodeClassLoader(classLoader);
|
||||
this.classLoader = AccessController.doPrivileged(new PrivilegedAction<BytecodeClassLoader>() {
|
||||
public BytecodeClassLoader run() {
|
||||
return new BytecodeClassLoader(classLoader);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public Instantiator getInstantiator(Class<? extends DataSerializable> clazz, int classId) {
|
||||
|
||||
@@ -77,7 +77,7 @@ public class InstantiatorFactoryBean implements BeanClassLoaderAware, FactoryBea
|
||||
}
|
||||
|
||||
public Class<?> getObjectType() {
|
||||
return (list == null ? list.getClass() : Collection.class);
|
||||
return (list != null ? list.getClass() : Collection.class);
|
||||
}
|
||||
|
||||
public boolean isSingleton() {
|
||||
|
||||
Reference in New Issue
Block a user