maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r732670 - /maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtils.java
Date Thu, 08 Jan 2009 10:04:43 GMT
Author: ltheussl
Date: Thu Jan  8 02:04:42 2009
New Revision: 732670

URL: http://svn.apache.org/viewvc?rev=732670&view=rev
Log:
[DOXIASITETOOLS-13] NPE when generating Maven site and no project URL defined (merged from
trunk r732668)
Submitted by: Adrian Tarau

Modified:
    maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtils.java

Modified: maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtils.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtils.java?rev=732670&r1=732669&r2=732670&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtils.java
(original)
+++ maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/PathUtils.java
Thu Jan  8 02:04:42 2009
@@ -80,6 +80,12 @@
             URL oldUrl = oldPathDescriptor.getPathUrl();
             URL newUrl = newPathDescriptor.getPathUrl();
 
+            if ( oldUrl == null || newUrl == null )
+            {
+                // One of the sites has a strange URL. no relative path possible, bail out.
+                return null;
+            }
+
             if ( ( newUrl.getProtocol().equalsIgnoreCase( oldUrl.getProtocol() ) )
                             && ( newUrl.getHost().equalsIgnoreCase( oldUrl.getHost()
) )
                             && ( newUrl.getPort() == oldUrl.getPort() ) )



Mime
View raw message