Return-Path: Delivered-To: apmail-xml-xerces-j-dev-archive@xml.apache.org Received: (qmail 17205 invoked by uid 500); 3 Apr 2003 23:06:31 -0000 Mailing-List: contact xerces-j-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: xerces-j-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list xerces-j-dev@xml.apache.org Received: (qmail 17192 invoked from network); 3 Apr 2003 23:06:30 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 3 Apr 2003 23:06:30 -0000 Received: (qmail 5473 invoked by uid 50); 3 Apr 2003 23:08:25 -0000 Date: 3 Apr 2003 23:08:25 -0000 Message-ID: <20030403230825.5472.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: xerces-j-dev@xml.apache.org Cc: Subject: DO NOT REPLY [Bug 18676] New: - TreeWalker.setCurrentNode(null) does not raise a NOT_SUPPORTED_ERR X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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=18676 TreeWalker.setCurrentNode(null) does not raise a NOT_SUPPORTED_ERR Summary: TreeWalker.setCurrentNode(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: Other AssignedTo: xerces-j-dev@xml.apache.org ReportedBy: nddelima@ca.ibm.com A NOT_SUPPORTED_ERR is not raised for TreeWalker.setCurrentNode if an attempt is made to set currentNode to null. Patch: Index: TreeWalkerImpl.java =================================================================== RCS file: /home/cvspublic/xml- xerces/java/src/org/apache/xerces/dom/TreeWalkerImpl.java,v retrieving revision 1.7 diff -u -r1.7 TreeWalkerImpl.java --- TreeWalkerImpl.java 9 Aug 2002 15:18:15 -0000 1.7 +++ TreeWalkerImpl.java 3 Apr 2003 14:40:23 -0000 @@ -60,6 +60,7 @@ import org.w3c.dom.Node; import org.w3c.dom.traversal.NodeFilter; import org.w3c.dom.traversal.TreeWalker; +import org.w3c.dom.DOMException; /** This class implements the TreeWalker interface. */ /** @@ -134,6 +135,10 @@ } /** Return the current Node. */ public void setCurrentNode(Node node) { + if (node == null) { + String msg = DOMMessageFormatter.formatMessage (DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); + throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg); + } fCurrentNode = node; } --------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org For additional commands, e-mail: xerces-j-dev-help@xml.apache.org