diff options
| author | gary <gary@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-09 09:31:18 +0000 |
|---|---|---|
| committer | gary <gary@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-09 09:31:18 +0000 |
| commit | 91b908c9675b061ea82a40913e9cf636112ac335 (patch) | |
| tree | 3dc83187a1ee8ef439d6cde12ff92ae57a5cf118 /libjava | |
| parent | 09fb10e8536409ff71e3580d00064a9ca99bc3a8 (diff) | |
| download | ppe42-gcc-91b908c9675b061ea82a40913e9cf636112ac335.tar.gz ppe42-gcc-91b908c9675b061ea82a40913e9cf636112ac335.zip | |
2007-03-09 Gary Benson <gbenson@redhat.com>
Chris Burdess <dog@gnu.org>
PR classpath/30831
* gnu/xml/dom/ls/SAXEventSink.java: Only set extended document
properties when reader is available.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122743 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
| -rw-r--r-- | libjava/classpath/ChangeLog.gcj | 7 | ||||
| -rw-r--r-- | libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java | 51 | ||||
| -rw-r--r-- | libjava/classpath/lib/gnu/xml/dom/ls/SAXEventSink.class | bin | 12922 -> 12933 bytes |
3 files changed, 34 insertions, 24 deletions
diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj index 315ac4d009b..122f83f3988 100644 --- a/libjava/classpath/ChangeLog.gcj +++ b/libjava/classpath/ChangeLog.gcj @@ -1,3 +1,10 @@ +2007-03-09 Gary Benson <gbenson@redhat.com> + Chris Burdess <dog@gnu.org> + + PR classpath/30831 + * gnu/xml/dom/ls/SAXEventSink.java: Only set extended document + properties when reader is available. + 2007-03-08 Gary Benson <gbenson@redhat.com> PR classpath/30983: diff --git a/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java b/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java index 285540060d9..364c576d196 100644 --- a/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java +++ b/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java @@ -144,37 +144,40 @@ public class SAXEventSink final String PROPERTIES = "http://xml.org/sax/properties/"; final String GNU_PROPERTIES = "http://gnu.org/sax/properties/"; - boolean standalone = reader.getFeature(FEATURES + "is-standalone"); - doc.setXmlStandalone(standalone); - try - { - String version = (String) reader.getProperty(PROPERTIES + - "document-xml-version"); - doc.setXmlVersion(version); - } - catch (SAXNotRecognizedException e) - { - } - catch (SAXNotSupportedException e) + if (reader != null) { + boolean standalone = reader.getFeature(FEATURES + "is-standalone"); + doc.setXmlStandalone(standalone); + try + { + String version = (String) reader.getProperty(PROPERTIES + + "document-xml-version"); + doc.setXmlVersion(version); + } + catch (SAXNotRecognizedException e) + { + } + catch (SAXNotSupportedException e) + { + } + try + { + String encoding = (String) reader.getProperty(GNU_PROPERTIES + + "document-xml-encoding"); + doc.setXmlEncoding(encoding); + } + catch (SAXNotRecognizedException e) + { + } + catch (SAXNotSupportedException e) + { + } } if (locator != null && locator instanceof Locator2) { String encoding = ((Locator2) locator).getEncoding(); doc.setInputEncoding(encoding); } - try - { - String encoding = (String) reader.getProperty(GNU_PROPERTIES + - "document-xml-encoding"); - doc.setXmlEncoding(encoding); - } - catch (SAXNotRecognizedException e) - { - } - catch (SAXNotSupportedException e) - { - } } public void endDocument() diff --git a/libjava/classpath/lib/gnu/xml/dom/ls/SAXEventSink.class b/libjava/classpath/lib/gnu/xml/dom/ls/SAXEventSink.class Binary files differindex d0caa3bd423..5ba9dfac935 100644 --- a/libjava/classpath/lib/gnu/xml/dom/ls/SAXEventSink.class +++ b/libjava/classpath/lib/gnu/xml/dom/ls/SAXEventSink.class |

