DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25347>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25347 DOMNormalizer throws ClassCastException while processing comments Summary: DOMNormalizer throws ClassCastException while processing comments Product: Xerces2-J Version: 2.6.0 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: DOM AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Try the following code: ----------------------------------------------------------------- import javax.xml.parsers.DocumentBuilderFactory; import junit.framework.TestCase; import junit.textui.TestRunner; import org.apache.xerces.dom.DocumentImpl; public class Bug extends TestCase { public Bug(String name) { super(name); } public static void main(String [] args) { TestRunner.run(Bug.class); } public void test1() throws Exception { DocumentImpl doc = (DocumentImpl)DocumentBuilderFactory.newInstance() .newDocumentBuilder().parse(Bug.class.getResource("test.xml").toExternalForm()); doc.getDomConfig().setParameter("entities", Boolean.FALSE); doc.normalizeDocument(); } } ----------------------------------------------------------------- with this data: ----------------------------------------------------------------- <?xml version="1.0"?> <!-- a comment --> <root/> ----------------------------------------------------------------- I get: ----------------------------------------------------------------- java.lang.ClassCastException at org.apache.xerces.dom.DOMNormalizer.normalizeNode(DOMNormalizer.java:519) at org.apache.xerces.dom.DOMNormalizer.normalizeDocument(DOMNormalizer.java:256) at org.apache.xerces.dom.CoreDocumentImpl.normalizeDocument(CoreDocumentImpl.java:1075) at bugComment.Bug.test1(Bug.java:35) ----------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
