Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESJ-973

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESJ-973
    Summary: Null poiner exception.
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces2-J
 Components: 
             DOM
   Fix Fors:
             2.6.2
   Versions:
             2.6.2

   Assignee: 
   Reporter: Venugopal Rao K

    Created: Mon, 31 May 2004 12:07 AM
    Updated: Mon, 31 May 2004 12:07 AM

Description:
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Document;
import org.w3c.dom.DOMException;

class test {
    public static void main(String [] args) throws Exception {
        DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().
                                 newDocumentBuilder();
        Document document1 = docBuilder.newDocument();
        Document document2 = docBuilder.newDocument();

        DocumentType docType = document1.getImplementation()
                              .createDocumentType("root", null, null);

        try {
            document2.importNode(docType, false);
            System.out.println("Failed: document type node imported,"
                             + " no exception is thrown.");
        } catch (DOMException e) {
            int code = ((DOMException)e).code;
            if (DOMException.NOT_SUPPORTED_ERR == code) {
                System.out.println("Passed.");
            } else {
                System.out.println("Failed: Unexpected error code "
                                 + code);
            }
        }
    }
}


---------------------------------------------------------------------
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]

Reply via email to