diff options
author | Conley Owens <cco3@android.com> | 2014-11-26 17:57:08 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-11-26 17:57:09 +0000 |
commit | 69d28437d3416301895639b4c51f9b31842126f5 (patch) | |
tree | eae6243c24d673c0389da483cce66ef66c40ca9f /core/tests | |
parent | ed23786cc5b19c66c526a576dd39dba720fa5340 (diff) | |
parent | 840796a3c29183a6f9bcf3d50ecae45405b63d88 (diff) | |
download | frameworks_base-69d28437d3416301895639b4c51f9b31842126f5.zip frameworks_base-69d28437d3416301895639b4c51f9b31842126f5.tar.gz frameworks_base-69d28437d3416301895639b4c51f9b31842126f5.tar.bz2 |
Merge "RRO tests: fix potential NPE"
Diffstat (limited to 'core/tests')
-rw-r--r-- | core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java b/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java index 42de9ea..e57c55c 100644 --- a/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java +++ b/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java @@ -225,8 +225,12 @@ public abstract class OverlayBaseTest extends AndroidTestCase { reader = new BufferedReader(new InputStreamReader(input)); actual = reader.readLine(); } finally { - reader.close(); - input.close(); + if (reader != null) { + reader.close(); + } + if (input != null) { + input.close(); + } } final String no = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, " + |