diff --git a/src/main/java/org/apache/commons/lang3/concurrent/Locks.java b/src/main/java/org/apache/commons/lang3/concurrent/Locks.java index 2a6e52f5d..f78a9dd6d 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/Locks.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/Locks.java @@ -78,22 +78,22 @@ public class Locks { } public void runReadLocked(FailableConsumer consumer) { - runLocked(lock.readLock(), consumer); + acceptLocked(lock.readLock(), consumer); } public void runWriteLocked(FailableConsumer consumer) { - runLocked(lock.writeLock(), consumer); + acceptLocked(lock.writeLock(), consumer); } public T callReadLocked(FailableFunction function) { - return callLocked(lock.readLock(), function); + return applyLocked(lock.readLock(), function); } public T callWriteLocked(FailableFunction function) { - return callLocked(lock.writeLock(), function); + return applyLocked(lock.writeLock(), function); } - protected void runLocked(long stamp, FailableConsumer consumer) { + protected void acceptLocked(long stamp, FailableConsumer consumer) { try { consumer.accept(lockedObject); } catch (Throwable t) { @@ -103,7 +103,7 @@ public class Locks { } } - protected T callLocked(long stamp, FailableFunction function) { + protected T applyLocked(long stamp, FailableFunction function) { try { return function.apply(lockedObject); } catch (Throwable t) {