diff options
author | Tom O'Neill <tomo@google.com> | 2010-11-05 10:14:24 -0700 |
---|---|---|
committer | Tom O'Neill <tomo@google.com> | 2010-11-05 10:14:24 -0700 |
commit | 28e3f101707c7a03dcc774b9b0e6d95d68b3752d (patch) | |
tree | 0efbc28f6a257c3664b16b0af377ea4318a3e0d0 /core/java/android/util/Xml.java | |
parent | e7aa07852dc5d360d223301d1415b87cddc57c99 (diff) | |
download | frameworks_base-28e3f101707c7a03dcc774b9b0e6d95d68b3752d.zip frameworks_base-28e3f101707c7a03dcc774b9b0e6d95d68b3752d.tar.gz frameworks_base-28e3f101707c7a03dcc774b9b0e6d95d68b3752d.tar.bz2 |
Remove inappropriate conversion of IOException to AssertionError
An IOException is a recoverable condition, and AssertionError should be
used for non-recoverable conditions.
Fixes b/3169361
Change-Id: Ie71a537293e01ffb49c5f535412e2631e27c84c8
Diffstat (limited to 'core/java/android/util/Xml.java')
-rw-r--r-- | core/java/android/util/Xml.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/core/java/android/util/Xml.java b/core/java/android/util/Xml.java index a2b69a5..873a218 100644 --- a/core/java/android/util/Xml.java +++ b/core/java/android/util/Xml.java @@ -79,15 +79,11 @@ public class Xml { */ public static void parse(InputStream in, Encoding encoding, ContentHandler contentHandler) throws IOException, SAXException { - try { - XMLReader reader = new ExpatReader(); - reader.setContentHandler(contentHandler); - InputSource source = new InputSource(in); - source.setEncoding(encoding.expatName); - reader.parse(source); - } catch (IOException e) { - throw new AssertionError(e); - } + XMLReader reader = new ExpatReader(); + reader.setContentHandler(contentHandler); + InputSource source = new InputSource(in); + source.setEncoding(encoding.expatName); + reader.parse(source); } /** |