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 2019/02/03 20:22:30 UTC

[maven-wagon] branch WAGON-556 updated (b137374 -> 46d3214)

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

michaelo pushed a change to branch WAGON-556
in repository https://gitbox.apache.org/repos/asf/maven-wagon.git.


 discard b137374  sdf
 discard daeb529  [WAGON-556] Skip parsing of user info for file:// URLs
     new 46d3214  [WAGON-556] Skip parsing of user info for file:// URLs

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   (b137374)
            \
             N -- N -- N   refs/heads/WAGON-556 (46d3214)

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:


[maven-wagon] 01/01: [WAGON-556] Skip parsing of user info for file:// URLs

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

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

commit 46d3214d4a91ccdf0e55dd3ac56a9e784c315d9e
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Feb 3 20:33:45 2019 +0100

    [WAGON-556] Skip parsing of user info for file:// URLs
---
 .../src/main/java/org/apache/maven/wagon/PathUtils.java     | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/wagon-provider-api/src/main/java/org/apache/maven/wagon/PathUtils.java b/wagon-provider-api/src/main/java/org/apache/maven/wagon/PathUtils.java
index 4641473..bee85b3 100644
--- a/wagon-provider-api/src/main/java/org/apache/maven/wagon/PathUtils.java
+++ b/wagon-provider-api/src/main/java/org/apache/maven/wagon/PathUtils.java
@@ -157,7 +157,7 @@ public final class PathUtils
             return "localhost";
         }
 
-        final String protocol = PathUtils.protocol( url );
+        String protocol = PathUtils.protocol( url );
 
         if ( protocol == null || protocol.equalsIgnoreCase( "file" ) )
         {
@@ -171,6 +171,13 @@ public final class PathUtils
             host = host.substring( host.indexOf( ":", 4 ) + 1 ).trim();
         }
 
+        protocol = PathUtils.protocol( host );
+
+        if ( protocol.equalsIgnoreCase( "file" ) )
+        {
+            return "localhost";
+        }
+
         // skip over protocol
         host = host.substring( host.indexOf( ":" ) + 1 ).trim();
         if ( host.startsWith( "//" ) )
@@ -292,7 +299,7 @@ public final class PathUtils
 
     /**
      * Derive the path portion of the given URL.
-     * 
+     *
      * @param url the repository URL
      * @return the basedir of the repository
      * @todo need to URL decode for spaces?
@@ -408,7 +415,7 @@ public final class PathUtils
     /**
      * Decodes the specified (portion of a) URL. <strong>Note:</strong> This decoder assumes that ISO-8859-1 is used to
      * convert URL-encoded octets to characters.
-     * 
+     *
      * @param url The URL to decode, may be <code>null</code>.
      * @return The decoded URL or <code>null</code> if the input was <code>null</code>.
      */