You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by ji...@apache.org on 2004/04/19 09:18:53 UTC
[jira] Updated: (XERCESJ-946) org.w3c.dom.ls.LSParser.abort() throws unexpected RuntimeException
The following issue has been updated:
Updater: Venugopal Rao K (mailto:K.Venugopal@sun.com)
Date: Mon, 19 Apr 2004 12:17 AM
Changes:
assignee changed to Venugopal Rao K
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/XERCESJ-946?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCESJ-946
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCESJ-946
Summary: org.w3c.dom.ls.LSParser.abort() throws unexpected RuntimeException
Type: Bug
Status: Open
Priority: Major
Project: Xerces2-J
Components:
DOM
Versions:
2.6.2
Assignee: Venugopal Rao K
Reporter: Venugopal Rao K
Created: Fri, 16 Apr 2004 1:40 AM
Updated: Mon, 19 Apr 2004 12:17 AM
Description:
import java.io.*;
import org.w3c.dom.ls.*;
import org.w3c.dom.*;
import javax.xml.parsers.*;
public class Test {
public static void main(String[] argv) {
Document doc = null;
try {
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDo
cumentBuilder();
doc = builder.parse(new StringBufferInputStream("<ROOT></ROOT>
"));
} catch (Throwable e) {
e.printStackTrace();
}
DOMImplementationLS implLS = (DOMImplementationLS)
doc.getImplementation().getFeature("LS","3.0");
final LSParser parser = implLS.createLSParser(DOMImplementationLS.MODE_S
YNCHRONOUS,null);
final LSInput input = implLS.createLSInput();
try {
input.setByteStream(new PipedInputStream(new PipedOutputStream()));
} catch(IOException e) {
e.printStackTrace();
}
Thread t = new Thread(new Runnable() {
public void run() {
Document d = parser.parse(input);
}
});
try {
t.start();
t.join(1000);
} catch(InterruptedException ie) {
ie.printStackTrace();
}
try {
parser.abort();
} catch (Throwable e) {
System.out.println("Unexpected exception: "+e);
e.printStackTrace();
System.exit(-1);
}
}
}
DOMLS says exceptions should not be thrown.
---------------------------------------------------------------------
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: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org