You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/05/26 17:25:50 UTC

[maven-resolver] branch master updated: Use static instead of literal

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

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git


The following commit(s) were added to refs/heads/master by this push:
     new 45e243b  Use static instead of literal
45e243b is described below

commit 45e243b62bc4a1a08243dfeddd8abe4cd0ed467b
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Wed May 26 19:25:41 2021 +0200

    Use static instead of literal
---
 .../org/eclipse/aether/named/support/AdaptedSemaphoreNamedLock.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/maven-resolver-named-locks/src/main/java/org/eclipse/aether/named/support/AdaptedSemaphoreNamedLock.java b/maven-resolver-named-locks/src/main/java/org/eclipse/aether/named/support/AdaptedSemaphoreNamedLock.java
index 70a4b1b..7b489d5 100644
--- a/maven-resolver-named-locks/src/main/java/org/eclipse/aether/named/support/AdaptedSemaphoreNamedLock.java
+++ b/maven-resolver-named-locks/src/main/java/org/eclipse/aether/named/support/AdaptedSemaphoreNamedLock.java
@@ -42,7 +42,7 @@ public class AdaptedSemaphoreNamedLock extends NamedLockSupport
 
     /**
      * Count of permissions involved with "nop" locking. When required lock step is preceded with a step that already
-     * fulfils currently requested locking, no locking is needed. In other words, caller already possesses the access to
+     * fulfills currently requested locking, no locking is needed. In other words, caller already possesses the access to
      * lock protected resource. The "nop" locking is used to track proper "boxing" of lock/unlock calls.
      */
     private static final int NONE = 0;
@@ -119,7 +119,7 @@ public class AdaptedSemaphoreNamedLock extends NamedLockSupport
             throw new IllegalStateException( "Wrong API usage: unlock w/o lock" );
         }
         int step = steps.pop();
-        if ( step > 0 )
+        if ( step > NONE )
         {
             semaphore.release( step );
         }