Buggy code:
@ Listener public class InfinispanBackingCacheEntryStore < K extends Serializable , V extends Cacheable < K > , E extends BackingCacheEntry < K , V > , C > extends AbstractBackingCacheEntryStore < K , V , E > { private final Logger log = Logger . getLogger ( getClass ( ) ) ; private final SharedLocalYieldingClusterLockManager lockManager ; private final LockKeyFactory < K , C > lockKeyFactory ; private final MarshalledValueFactory < C > keyFactory ; private final MarshalledValueFactory < C > valueFactory ; private final C context ; private final boolean controlCacheLifecycle ; private final Cache < MarshalledValue < K , C > , MarshalledValue < E , C > > cache ; private final CacheInvoker invoker ; private final PassivationManager < K , E > passivationManager ; private final boolean clustered ; public InfinispanBackingCacheEntryStore ( Cache < MarshalledValue < K , C > , MarshalledValue < E , C > > cache , CacheInvoker invoker , PassivationManager < K , E > passivationManager , StatefulTimeoutInfo timeout , ClusteredBackingCacheEntryStoreConfig config , boolean controlCacheLifecycle , MarshalledValueFactory < C > keyFactory , MarshalledValueFactory < C > valueFactory , C context , SharedLocalYieldingClusterLockManager lockManager , LockKeyFactory < K , C > lockKeyFactory ) { } @ Override public void start ( ) { } @ Override public void stop ( ) { } @ Override public void insert ( E entry ) { } @ Override public E get ( K id , boolean lock ) { } @ Override public void update ( E entry , boolean modified ) { } @ Override public E remove ( K id ) { } private < R > R invoke ( InfinispanBackingCacheEntryStore < K , V , E , C > . Operation < R > operation ) { } private MarshalledValue < K , C > marshalKey ( K key ) { } private K unmarshalKey ( MarshalledValue < K , C > key ) { } private MarshalledValue < E , C > marshalEntry ( E value ) { } private E unmarshalEntry ( K id , MarshalledValue < E , C > value ) { } private LockResult acquireSessionOwnership ( MarshalledValue < K , C > key , boolean newLock ) { if ( ( this . lockManager ) == null ) return null ; Serializable lockKey = this . lockKeyFactory . createLockKey ( key ) ; this . trace ( "Acquiring<seq2seq4repair_space>%slock<seq2seq4repair_space>on<seq2seq4repair_space>%s" , ( newLock ? "new<seq2seq4repair_space>" : "" ) , lockKey ) ; try { <START_BUG> LockResult result = this . lockManager . lock ( lockKey , this . cache . getConfiguration ( ) . getLockAcquisitionTimeout ( ) , newLock ) ; <END_BUG> this . trace ( "Lock<seq2seq4repair_space>acquired<seq2seq4repair_space>(%s)<seq2seq4repair_space>on<seq2seq4repair_space>%s" , result , lockKey ) ; return result ; } catch ( TimeoutException e ) { throw MESSAGES . lockAcquisitionTimeout ( e , lockKey ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throw MESSAGES . lockAcquisitionInterruption ( e , lockKey ) ; } } private void releaseSessionOwnership ( MarshalledValue < K , C > key , boolean remove ) { } @ Override public void passivate ( E entry ) { } @ Override public boolean isClustered ( ) { } @ Override public boolean isCompatibleWith ( GroupCompatibilityChecker other ) { } @ CacheEntryActivated public void activated ( CacheEntryActivatedEvent < MarshalledValue < K , C > , MarshalledValue < E , C > > event ) { } @ CacheEntryPassivated public void passivated ( CacheEntryPassivatedEvent < MarshalledValue < K , C > , MarshalledValue < E , C > > event ) { } abstract class Operation < R > implements CacheInvoker . Operation < MarshalledValue < K , C > , MarshalledValue < E , C > , R > { } private void trace ( String message , Object ... args ) { } }

Fix:
LockResult result = this . lockManager . lock ( lockKey , this . cache . getCacheConfiguration ( ) . locking ( ) . lockAcquisitionTimeout ( ) , newLock ) ;