diff options
author | Brian Muramatsu <btmura@google.com> | 2010-11-17 12:28:51 -0800 |
---|---|---|
committer | Brian Muramatsu <btmura@google.com> | 2010-11-17 12:28:51 -0800 |
commit | 48983959a34f67024bd0411c8353c196e6a87717 (patch) | |
tree | 02e306ba2f70971265902810f70a35cb6e30d5d3 /test-runner | |
parent | 81c4cea9ec4b08f8c06fdef86d51069adb739eb7 (diff) | |
download | frameworks_base-48983959a34f67024bd0411c8353c196e6a87717.zip frameworks_base-48983959a34f67024bd0411c8353c196e6a87717.tar.gz frameworks_base-48983959a34f67024bd0411c8353c196e6a87717.tar.bz2 |
Fix NPE in InstrumentationTestRunner
This fixes a problem where the test runner would die when a
test case has tests that are not methods of the test class.
Change-Id: I5adc464bb4a0c8d282428895e422a47dcb6bfe1f
Diffstat (limited to 'test-runner')
-rw-r--r-- | test-runner/src/android/test/InstrumentationTestRunner.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test-runner/src/android/test/InstrumentationTestRunner.java b/test-runner/src/android/test/InstrumentationTestRunner.java index 3ac74f7..5ce3efc 100644 --- a/test-runner/src/android/test/InstrumentationTestRunner.java +++ b/test-runner/src/android/test/InstrumentationTestRunner.java @@ -785,7 +785,7 @@ public class InstrumentationTestRunner extends Instrumentation implements TestSu mIncludeDetailedStats = false; try { // Look for TimedTest annotation on both test class and test method - if (testMethod.isAnnotationPresent(TimedTest.class)) { + if (testMethod != null && testMethod.isAnnotationPresent(TimedTest.class)) { mIsTimedTest = true; mIncludeDetailedStats = testMethod.getAnnotation( TimedTest.class).includeDetailedStats(); |