xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18678] New: - DocumentTraversal.createNodeIterator with root=null does not raise a NOT_SUPPORTED_ERR
Date Thu, 03 Apr 2003 23:22:25 GMT
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=18678>.
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=18678

DocumentTraversal.createNodeIterator with root=null does not raise a NOT_SUPPORTED_ERR

           Summary: DocumentTraversal.createNodeIterator with root=null does
                    not raise a NOT_SUPPORTED_ERR
           Product: Xerces2-J
           Version: 2.4.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: DOM
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: nddelima@ca.ibm.com


A NOT_SUPPORTED_ERR is not raised for DocumentTraversal.createNodeIterator if 
the specified root is null.

See http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-
20001113/traversal.html#Traversal-NodeIteratorFactory-createNodeIterator

Index: DocumentImpl.java
===================================================================
RCS file: /home/cvspublic/xml-
xerces/java/src/org/apache/xerces/dom/DocumentImpl.java,v
retrieving revision 1.76
diff -u -r1.76 DocumentImpl.java
--- DocumentImpl.java	21 Feb 2003 19:09:49 -0000	1.76
+++ DocumentImpl.java	3 Apr 2003 14:41:04 -0000
@@ -261,6 +261,10 @@
                                            NodeFilter filter,
                                            boolean entityReferenceExpansion)
     {
+        if (root == null) {
+            String msg = DOMMessageFormatter.formatMessage
(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
+            throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
+        }
         NodeIterator iterator = new NodeIteratorImpl(this,
                                                      root,
                                                      whatToShow,

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Mime
View raw message