You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2019/01/23 19:50:40 UTC

[maven] branch MNG-6571 updated (106dc11 -> b43bdd4)

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

hboutemy pushed a change to branch MNG-6571
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard 106dc11  [MNG-6571] add synchronization since require to be threadsafe
     new b43bdd4  [MNG-6571] add synchronization since require to be threadsafe

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (106dc11)
            \
             N -- N -- N   refs/heads/MNG-6571 (b43bdd4)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/java/org/apache/maven/artifact/versioning/VersionRange.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[maven] 01/01: [MNG-6571] add synchronization since require to be threadsafe

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch MNG-6571
in repository https://gitbox.apache.org/repos/asf/maven.git

commit b43bdd41eff12d87c61ed1fe7cffdd31ec6905e9
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Wed Jan 23 18:45:23 2019 +0100

    [MNG-6571] add synchronization since require to be threadsafe
---
 .../main/java/org/apache/maven/artifact/versioning/VersionRange.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
index fb6c0ad..68d8b30 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.WeakHashMap;
 
 import org.apache.maven.artifact.Artifact;
@@ -34,7 +35,8 @@ import org.apache.maven.artifact.Artifact;
  */
 public class VersionRange
 {
-    private static final WeakHashMap<String, VersionRange> CACHE = new WeakHashMap<>();
+    private static final Map<String, VersionRange> CACHE =
+        Collections.<String, VersionRange>synchronizedMap( new WeakHashMap<String, VersionRange>() );
 
     private final ArtifactVersion recommendedVersion;