* Read the expected exceptions, if any (need to handle both the old and new
* syntax
*/
public static Class<?>[] findExpectedExceptions(IAnnotationFinder finder, Method method) {
Class<?>[] result = {};
IExpectedExceptions expectedExceptions=
(IExpectedExceptions) finder.findAnnotation(method,
IExpectedExceptions.class);
// Old syntax
if (expectedExceptions != null) {
result = expectedExceptions.getValue();
}
else {
// New syntax
ITest testAnnotation =
(ITest) finder.findAnnotation(method, ITest.class);