From: SourceForge.net <no...@so...> - 2004-07-19 08:22:14
|
Bugs item #991471, was opened at 2004-07-15 11:59 Message generated for change (Comment added) made by pkuzel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113153&aid=991471&group_id=13153 Category: Tidy functionality Group: None Status: Open Resolution: None Priority: 5 Submitted By: Petr Kuzel (pkuzel) Assigned to: fabrizio giustina (fgiust) Summary: NPE on file with CDATA Initial Comment: java.lang.NullPointerException at org.w3c.tidy.PPrint.printXMLTree(Unknown Source) at org.w3c.tidy.PPrint.printXMLTree(Unknown Source) at org.w3c.tidy.PPrint.printXMLTree(Unknown Source) at org.w3c.tidy.PPrint.printXMLTree(Unknown Source) at org.w3c.tidy.PPrint.printXMLTree(Unknown Source) at org.w3c.tidy.Tidy.parse(Unknown Source) at org.w3c.tidy.Tidy.parse(Unknown Source) steps to reproduce: The Ant target that causes the issue is: ==== <target name="help"> <echo> <![CDATA[ *** Help message *** *** End of help message *** ]]> </echo> </target> ==== Note that the same target withOUT the CDATA element: ==== <target name="help"> <echo> *** Help message *** *** End of help message *** </echo> </target> ==== gives no problem. So the culprit seems to the CDATA elelment. Thanks! See alse <http://tasklist.netbeans.org/issues/show_bug.cgi?id=44679> ---------------------------------------------------------------------- >Comment By: Petr Kuzel (pkuzel) Date: 2004-07-19 10:22 Message: Logged In: YES user_id=386690 Called programatically: if (tidy == null) { tidy = new Tidy(); } tidy.setOnlyErrors(true); tidy.setShowWarnings(true); tidy.setQuiet(true); // XXX Apparently JSP pages (at least those involving // JSF) need XML handling in order for JTidy not to choke on them tidy.setXmlTags(isXML || isJSP); PrintWriter output = new ReportWriter(this); tidy.setErrout(output); // Where do I direct its output? If it really obeys // setQuiet(true) it shouldn't matter... tidy.parse(input, System.err); I asked original reporter to provide his document. ---------------------------------------------------------------------- Comment By: fabrizio giustina (fgiust) Date: 2004-07-18 18:39 Message: Logged In: YES user_id=798060 added a testcase in CVS. I'm however unable to reproduce the problem using both r7 and the latest cvs version. Which options are you using in formatting? (actually test simply sets input-xml= yes, output-xml= yes) Is the snippet enough to cause the problem or it's only a part of a bigger document? Can ou please uplad the original document and the option uset in tidy setup? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113153&aid=991471&group_id=13153 |