You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mc...@apache.org on 2011/05/17 00:53:03 UTC
svn commit: r1103939 -
/myfaces/trinidad-maven/branches/2.0.x-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
Author: mcooper
Date: Mon May 16 22:53:03 2011
New Revision: 1103939
URL: http://svn.apache.org/viewvc?rev=1103939&view=rev
Log:
Fix NullPointerException when using Maven 3.0.3:
Caused by: java.lang.NullPointerException
at java.io.Writer.write(Writer.java:140)
at org.apache.myfaces.trinidadbuild.plugin.tagdoc.TagdocReport._writeComponentFacets(TagdocReport.java:1302)
at org.apache.myfaces.trinidadbuild.plugin.tagdoc.TagdocReport._generateComponentDoc(TagdocReport.java:562)
at org.apache.myfaces.trinidadbuild.plugin.tagdoc.TagdocReport._generateTagDocs(TagdocReport.java:218)
at org.apache.myfaces.trinidadbuild.plugin.tagdoc.TagdocReport.executeReport(TagdocReport.java:108)
Modified:
myfaces/trinidad-maven/branches/2.0.x-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java?rev=1103939&r1=1103938&r2=1103939&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java Mon May 16 22:53:03 2011
@@ -81,7 +81,6 @@ import org.codehaus.doxia.site.renderer.
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
-
/**
* Report for generating JSF tagdoc based on faces-config.xml parsing.
* Note that this is not really an AbstractMavenMultiPageReport - the
@@ -143,6 +142,7 @@ public class TagdocReport extends Abstra
// The map is built using the getSatisfiedContracts method API on the component bean to determine
// which contracts are satisfied for a given tagname
Map<String, List<QName>> contractMap = new HashMap<String, List<QName>>();
+
while (compIter.hasNext())
{
ComponentBean compBean = compIter.next();
@@ -356,14 +356,14 @@ public class TagdocReport extends Abstra
sb.append(_getQualifiedName(tagName));
sb.append("</a>");
gotOne = true;
- }
}
}
- if (gotOne)
- {
- sb.append("<br/>\n");
- formatted = sb.toString();
- }
+ }
+ if (gotOne)
+ {
+ sb.append("<br/>\n");
+ formatted = sb.toString();
+ }
return formatted;
}
@@ -391,9 +391,9 @@ public class TagdocReport extends Abstra
// in a separate table cell, so no header text is passed into this method
if (header != null && !header.isEmpty())
{
- sb.append("<b>");
- sb.append(header);
- sb.append(":</b> ");
+ sb.append("<b>");
+ sb.append(header);
+ sb.append(":</b> ");
}
boolean gotOne = false;
@@ -735,7 +735,7 @@ public class TagdocReport extends Abstra
null);
out.write("<tr>\n");
out.write("<td><b>Required Ancestor Tag(s):</b></td>");
- out.write ("<td>" + formattedAncestors + "</td>");
+ out.write("<td>" + formattedAncestors + "</td>");
out.write("</tr>\n");
}
@@ -1299,8 +1299,11 @@ public class TagdocReport extends Abstra
if (facet.hasAllowedChildComponents())
{
String formattedChildComps = _formatTagList (facet.allowedChildComponents(), compTypeMap, "Allowed Child Components");
- out.write (formattedChildComps);
- out.write("<br/>");
+ if (formattedChildComps != null)
+ {
+ out.write(formattedChildComps);
+ out.write("<br/>");
+ }
}
out.write(facet.getDescription());
@@ -1867,7 +1870,6 @@ public class TagdocReport extends Abstra
*/
private File outputDirectory;
-
/**
* Directory where the original site is present.
* (TRIED using ${baseDir}/src/site; that inserted a 'null' into