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

Commit 840796a3 authored by Mårten Kongstad's avatar Mårten Kongstad Committed by Zoran Jovanovic
Browse files

RRO tests: fix potential NPE

Bug: 17765434

Check for null before closing streams.

Change-Id: I651785649575725009f270d4d8eb5f4bf90952a6
parent 97b5df76
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -225,9 +225,13 @@ public abstract class OverlayBaseTest extends AndroidTestCase {
            reader = new BufferedReader(new InputStreamReader(input));
            actual = reader.readLine();
        } finally {
            if (reader != null) {
                reader.close();
            }
            if (input != null) {
                input.close();
            }
        }

        final String no = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, " +
            "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " +