You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/06/18 16:36:08 UTC

[commons-lang] branch master updated: Use names that reflect the functional interface in use.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new f05c39b  Use names that reflect the functional interface in use.
f05c39b is described below

commit f05c39b6e4d0c9d0f939a13bed916c442b098be6
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jun 18 12:36:00 2020 -0400

    Use names that reflect the functional interface in use.
---
 src/main/java/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 2a6e52f..f78a9dd 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<O, ?> consumer) {
-            runLocked(lock.readLock(), consumer);
+            acceptLocked(lock.readLock(), consumer);
         }
 
         public void runWriteLocked(FailableConsumer<O, ?> consumer) {
-            runLocked(lock.writeLock(), consumer);
+            acceptLocked(lock.writeLock(), consumer);
         }
 
         public <T> T callReadLocked(FailableFunction<O, T, ?> function) {
-            return callLocked(lock.readLock(), function);
+            return applyLocked(lock.readLock(), function);
         }
 
         public <T> T callWriteLocked(FailableFunction<O, T, ?> function) {
-            return callLocked(lock.writeLock(), function);
+            return applyLocked(lock.writeLock(), function);
         }
 
-        protected void runLocked(long stamp, FailableConsumer<O, ?> consumer) {
+        protected void acceptLocked(long stamp, FailableConsumer<O, ?> consumer) {
             try {
                 consumer.accept(lockedObject);
             } catch (Throwable t) {
@@ -103,7 +103,7 @@ public class Locks {
             }
         }
 
-        protected <T> T callLocked(long stamp, FailableFunction<O, T, ?> function) {
+        protected <T> T applyLocked(long stamp, FailableFunction<O, T, ?> function) {
             try {
                 return function.apply(lockedObject);
             } catch (Throwable t) {