maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r982571 - /maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
Date Thu, 05 Aug 2010 12:21:46 GMT
Author: ltheussl
Date: Thu Aug  5 12:21:46 2010
New Revision: 982571

URL: http://svn.apache.org/viewvc?rev=982571&view=rev
Log:
[MLINKCHECK-1] fix NPE when pom has no reporting section

Modified:
    maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java

Modified: maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java?rev=982571&r1=982570&r2=982571&view=diff
==============================================================================
--- maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
(original)
+++ maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
Thu Aug  5 12:21:46 2010
@@ -46,6 +46,7 @@ import org.apache.maven.doxia.linkcheck.
 import org.apache.maven.doxia.linkcheck.model.LinkcheckFileResult;
 import org.apache.maven.doxia.linkcheck.model.LinkcheckModel;
 import org.apache.maven.doxia.siterenderer.Renderer;
+import org.apache.maven.model.Reporting;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.AbstractMavenReport;
@@ -575,6 +576,12 @@ public class LinkcheckReport
             ioe.setStackTrace( e.getStackTrace() );
             throw ioe;
         }
+
+        // MLINKCHECK-1
+        if ( clone.getOriginalModel().getReporting() == null ) {
+            clone.getOriginalModel().setReporting( new Reporting() );
+        }
+
         clone.getOriginalModel().getReporting().setOutputDirectory( tmpReportingOutputDirectory.getAbsolutePath()
);
 
         // create the original model as tmp pom file for the invoker



Mime
View raw message