diff options
author | Chris Burdess <dog@bluezoo.org> | 2006-12-06 11:36:42 +0000 |
---|---|---|
committer | Chris Burdess <dog@bluezoo.org> | 2006-12-06 11:36:42 +0000 |
commit | 6162e5d91009524030a8e3855b111360410fe342 (patch) | |
tree | a447cd8e3bc16f19203c6526e3caf0b26051c101 | |
parent | bb86f4e4d4138b46926fdaecd0c9c700ee3985e1 (diff) | |
download | classpath-6162e5d91009524030a8e3855b111360410fe342.tar.gz |
2006-12-06 Chris Burdess <dog@gnu.org>
Fixes PR 29272.
* javax/xml/parsers/DocumentBuilderFactory.java: Fix broken Javadoc.
* gnu/xml/stream/SAXParser.java: Fix file descriptor leak.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gnu/xml/stream/SAXParser.java | 15 | ||||
-rw-r--r-- | javax/xml/parsers/DocumentBuilderFactory.java | 2 |
3 files changed, 19 insertions, 4 deletions
@@ -1,5 +1,11 @@ 2006-12-06 Chris Burdess <dog@gnu.org> + Fixes PR 29272. + * javax/xml/parsers/DocumentBuilderFactory.java: Fix broken Javadoc. + * gnu/xml/stream/SAXParser.java: Fix file descriptor leak. + +2006-12-06 Chris Burdess <dog@gnu.org> + Fixes PR 29264. * gnu/xml/stream/XMLStreamWriterImpl.java: Allow arbitrary text in writeDTD method. diff --git a/gnu/xml/stream/SAXParser.java b/gnu/xml/stream/SAXParser.java index e58d5fb52..e037560b1 100644 --- a/gnu/xml/stream/SAXParser.java +++ b/gnu/xml/stream/SAXParser.java @@ -1021,9 +1021,18 @@ public class SAXParser SAXParser parser = new SAXParser(validating, namespaceAware, xIncludeAware); InputSource input = new InputSource(args[pos]); - XMLReader reader = parser.getXMLReader(); - reader.setContentHandler(handler); - reader.parse(input); + FileReader fr = new java.io.FileReader(args[pos]); + input.setCharacterStream(fr); + try + { + XMLReader reader = parser.getXMLReader(); + reader.setContentHandler(handler); + reader.parse(input); + } + finally + { + fr.close(); + } pos++; } } diff --git a/javax/xml/parsers/DocumentBuilderFactory.java b/javax/xml/parsers/DocumentBuilderFactory.java index 0dc574e65..9312e65e0 100644 --- a/javax/xml/parsers/DocumentBuilderFactory.java +++ b/javax/xml/parsers/DocumentBuilderFactory.java @@ -50,7 +50,7 @@ import javax.xml.validation.Schema; * Factory for obtaining document builders. * Instances of this class are <em>not</em> guaranteed to be thread safe. * - * @author (a href='mailto:dog@gnu.org'>Chris Burdess</a) + * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> */ public abstract class DocumentBuilderFactory { |