From f05c39b6e4d0c9d0f939a13bed916c442b098be6 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Thu, 18 Jun 2020 12:36:00 -0400 Subject: [PATCH] Use names that reflect the functional interface in use. --- .../org/apache/commons/lang3/concurrent/Locks.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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) {