You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/02/19 20:31:54 UTC

[GitHub] [maven-doxia-sitetools] michael-o commented on a change in pull request #10: [DOXIASITETOOLS-109] handle more URI formats

michael-o commented on a change in pull request #10: [DOXIASITETOOLS-109] handle more URI formats
URL: https://github.com/apache/maven-doxia-sitetools/pull/10#discussion_r381526510
 
 

 ##########
 File path: doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
 ##########
 @@ -174,20 +173,34 @@ public Artifact getSkinArtifactFromRepository( ArtifactRepository localRepositor
         return artifact;
     }
 
-    /** {@inheritDoc} */
     public Artifact getDefaultSkinArtifact( ArtifactRepository localRepository,
                                             List<ArtifactRepository> remoteArtifactRepositories )
         throws SiteToolException
     {
         return getSkinArtifactFromRepository( localRepository, remoteArtifactRepositories, new DecorationModel() );
     }
 
-    /** {@inheritDoc} */
+    /**
+     * This method is not implemented according to the URI specification and has many weird
+     * corner cases where it doesn't do the right thing. Please consider using a better 
+     * implemented method from a different library such as org.apache.http.client.utils.URIUtils#resolve.
+     */
+    @Deprecated
     public String getRelativePath( String to, String from )
     {
         checkNotNull( "to", to );
         checkNotNull( "from", from );
-
+        
+        if ( to.contains( ":" ) && from.contains( ":" ) )
 
 Review comment:
   This could be dangerous/wrong. Consider this: `blabla.com:8080/sdfsd`. No scheme, but you'd still process here. Better check for `://`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services