danberindei/infinispan — comment on commit 5d2d2b7b8c79fff1300722fc49ddf018876a89a8
File: core/src/main/java/org/infinispan/interceptors/StateTransferLockInterceptor.java line 151
By danberindei:

I just moved the lock acquisition to handleWriteCommand() - the lock is still acquired.
I think the problem is that it's too easy to confuse handleWriteCommand() with handleWithRetries() :)

The visitor is just very roundabout way of doing a switch (command.getClass()) - the effect is that the appropriate shouldAcquireLock overload is called.