bug in crimson jar(1.1.3)

<[email protected]>
Newsgroups gmane.text.xml.general
Message-ID <3655.192.168.1.98.1083231271.squirrel@mail>
Hi,

There is a bug in crimson jar(1.1.3) in the following file.

org\apache\crimson\parser\InputEntity.java, in the method

//        public void init(InputSource in, String name, InputEntity stack,
//               boolean isPE) throws IOException, SAXException


//reader = XmlReader.createReader(url.openStream()); // line no 208

but url.openStream() method takes a lock on the url, if url is a file url
we can not delete this till JVM exits. we can suppress this locking by
doing so

//----------------------
URLConnection urlConnection = url.openConnection();
urlConnection.setUseCaches(false);
inputStream = urlConnection.getInputStream();
reader = XmlReader.createReader(inputStream);
//--------------------------

if you want me to send the patch file, pl let me know.

regards,
Sato.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.