AI 144420: am: CL 144383 am: CL 144369 CTS: Fix a bug in test-progress-new, which will introduce crash if there is @ToBeFixed without description.
Original author: sus
Merged from: //branches/cupcake/...
Original author: android-build
Automated import of CL 144420
diff --git a/tools/test-progress-new/src/testprogress2/MethodOriginator.java b/tools/test-progress-new/src/testprogress2/MethodOriginator.java
index 1bb258e..e46b436 100644
--- a/tools/test-progress-new/src/testprogress2/MethodOriginator.java
+++ b/tools/test-progress-new/src/testprogress2/MethodOriginator.java
@@ -61,8 +61,12 @@
+ (String)annot.elementValues()[0].value().value();
} else if (annot.annotationType().qualifiedName().equals(
"dalvik.annotation.ToBeFixed")) {
- toBeFixed = "<b>@ToBeFixed:</b>"
- + (String)annot.elementValues()[0].value().value();
+ String info = "N/A";
+ if (annot.elementValues().length > 0) {
+ info = (String)annot.elementValues()[0].value().value();
+ }
+
+ toBeFixed = "<b>@ToBeFixed:</b>" + info;
}
// else some other annotation - ignore
}