Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28e3f101 authored by Tom O'Neill's avatar Tom O'Neill
Browse files

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
parent e7aa0785
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -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);
        }
    }

    /**