diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/InfinispanRegionFactory.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/InfinispanRegionFactory.java index 7ff295b241..b88131817f 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/InfinispanRegionFactory.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/InfinispanRegionFactory.java @@ -457,7 +457,7 @@ public class InfinispanRegionFactory implements RegionFactory { private Map initGenericDataTypeOverrides() { final TypeOverrides entityOverrides = new TypeOverrides(); - entityOverrides.setCacheName(DEF_ENTITY_RESOURCE); + entityOverrides.setCacheName( DEF_ENTITY_RESOURCE ); typeOverrides.put( ENTITY_KEY, entityOverrides ); final TypeOverrides immutableEntityOverrides = new TypeOverrides(); immutableEntityOverrides.setCacheName( DEF_IMMUTABLE_ENTITY_RESOURCE ); diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TransactionalAccessDelegate.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TransactionalAccessDelegate.java index 8d8eed10ca..bafe2d9800 100755 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TransactionalAccessDelegate.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TransactionalAccessDelegate.java @@ -205,7 +205,7 @@ public class TransactionalAccessDelegate { if ( !putValidator.invalidateRegion() ) { throw new CacheException( "Failed to invalidate pending putFromLoad calls for region " + region.getName() ); } - Caches.removeAll(cache); + Caches.removeAll( cache ); } /** diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/entity/EntityRegionImpl.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/entity/EntityRegionImpl.java index 77cfa77f73..f81a642211 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/entity/EntityRegionImpl.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/entity/EntityRegionImpl.java @@ -46,10 +46,11 @@ public class EntityRegionImpl extends BaseTransactionalDataRegion implements Ent case READ_ONLY: return new ReadOnlyAccess( this ); case TRANSACTIONAL: - if (getCacheDataDescription().isMutable()) { - return new TransactionalAccess(this); - } else { - return new ReadOnlyAccess(this); + if ( getCacheDataDescription().isMutable() ) { + return new TransactionalAccess( this ); + } + else { + return new ReadOnlyAccess( this ); } default: throw new CacheException( "Unsupported access type [" + accessType.getExternalName() + "]" ); diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/impl/BaseRegion.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/impl/BaseRegion.java index 1c4af09ea7..0fbb5dfb0c 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/impl/BaseRegion.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/impl/BaseRegion.java @@ -153,22 +153,22 @@ public abstract class BaseRegion implements Region { // (without forcing autoCommit cache configuration). Transaction tx = getCurrentTransaction(); if ( tx != null ) { - log.tracef("Transaction, clearing one element at the time"); - Caches.removeAll(localAndSkipLoadCache); + log.tracef( "Transaction, clearing one element at the time" ); + Caches.removeAll( localAndSkipLoadCache ); } else { - log.tracef("Non-transactional, clear in one go"); + log.tracef( "Non-transactional, clear in one go" ); localAndSkipLoadCache.clear(); } - log.tracef("Transition state from CLEARING to VALID"); + log.tracef( "Transition state from CLEARING to VALID" ); invalidateState.compareAndSet( InvalidateState.CLEARING, InvalidateState.VALID ); } catch ( Exception e ) { if ( log.isTraceEnabled() ) { - log.trace("Could not invalidate region: ", e); + log.trace( "Could not invalidate region: ", e ); } } } @@ -223,7 +223,7 @@ public abstract class BaseRegion implements Region { */ public void invalidateRegion() { if (log.isTraceEnabled()) { - log.trace("Invalidate region: " + name); + log.trace( "Invalidate region: " + name ); } Transaction tx = getCurrentTransaction(); @@ -254,7 +254,7 @@ public abstract class BaseRegion implements Region { public boolean isRegionInvalidatedInCurrentTx() { Transaction tx = getCurrentTransaction(); - return tx != null && tx.equals(invalidateTransaction); + return tx != null && tx.equals( invalidateTransaction ); } private Transaction getCurrentTransaction() { diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/util/Caches.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/util/Caches.java index 7c74b01c0c..dbec1ade80 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/util/Caches.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/util/Caches.java @@ -254,7 +254,8 @@ public class Caches { CloseableIterator it = cache.keySet().iterator(); try { while (it.hasNext()) { - it.next(); // Necessary to get next element + // Necessary to get next element + it.next(); it.remove(); } }