Message: A new issue has been created in JIRA.
--------------------------------------------------------------------- View the issue: http://issues.apache.org/jira/browse/XERCESJ-947 Here is an overview of the issue: --------------------------------------------------------------------- Key: XERCESJ-947 Summary: Documnet.adoptNode() does not call user data handler Type: Bug Status: Open Priority: Minor Project: Xerces2-J Components: DOM Versions: 2.6.2 Assignee: Venugopal Rao K Reporter: Venugopal Rao K Created: Mon, 19 Apr 2004 12:11 AM Updated: Mon, 19 Apr 2004 12:11 AM Description: To reproduce the bug compile and run test.java as shown in the log below: ------------------------------------------ test.java import org.w3c.dom.Node; import org.w3c.dom.Element; import org.w3c.dom.Document; import org.w3c.dom.UserDataHandler; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; class test { static boolean called; public static void main(String [] args) throws Exception { UserDataHandler handler = new UserDataHandler() { public void handle(short operation, String key, Object data, Node src, Node dst) { if (key != null && operation == UserDataHandler.NODE_ADOPTED) { called = true; } } }; DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document firstDoc = docBuilder.newDocument(); Document secondDoc = docBuilder.newDocument(); Element adoptedElem = secondDoc.createElement("root"); adoptedElem.setUserData("comment" , "user data of the element", handler); firstDoc.adoptNode(adoptedElem); if (null != firstDoc.adoptNode(adoptedElem) && !called) { System.out.println("the user data handler has not been called"); } else { System.out.println("OK"); } } } --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
