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 45e38e9  Better method names.
45e38e9 is described below

commit 45e38e91f902461a91dfbad36c681435aa95fac6
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Fri Jun 19 11:02:54 2020 -0400

    Better method names.
---
 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 f8ecae9..c485686 100644
--- a/src/main/java/org/apache/commons/lang3/concurrent/Locks.java
+++ b/src/main/java/org/apache/commons/lang3/concurrent/Locks.java
@@ -79,22 +79,22 @@ public class Locks {
         }
 
         public void runReadLocked(final FailableConsumer<O, ?> consumer) {
-            acceptLocked(() -> lock.readLock(), consumer);
+            lockAcceptUnlock(() -> lock.readLock(), consumer);
         }
 
         public void runWriteLocked(final FailableConsumer<O, ?> consumer) {
-            acceptLocked(() -> lock.writeLock(), consumer);
+            lockAcceptUnlock(() -> lock.writeLock(), consumer);
         }
 
         public <T> T callReadLocked(final FailableFunction<O, T, ?> function) {
-            return applyLocked(() -> lock.readLock(), function);
+            return lockApplyUnock(() -> lock.readLock(), function);
         }
 
         public <T> T callWriteLocked(final FailableFunction<O, T, ?> function) 
{
-            return applyLocked(() -> lock.writeLock(), function);
+            return lockApplyUnock(() -> lock.writeLock(), function);
         }
 
-        protected void acceptLocked(final LongSupplier stampSupplier, final 
FailableConsumer<O, ?> consumer) {
+        protected void lockAcceptUnlock(final LongSupplier stampSupplier, 
final FailableConsumer<O, ?> consumer) {
             final long stamp = stampSupplier.getAsLong();
             try {
                 consumer.accept(lockedObject);
@@ -105,7 +105,7 @@ public class Locks {
             }
         }
 
-        protected <T> T applyLocked(final LongSupplier stampSupplier, final 
FailableFunction<O, T, ?> function) {
+        protected <T> T lockApplyUnock(final LongSupplier stampSupplier, final 
FailableFunction<O, T, ?> function) {
             final long stamp = stampSupplier.getAsLong();
             try {
                 return function.apply(lockedObject);

Reply via email to