boolean hit = false;
for (Annotation a : annotations) {
if (a.annotationType().equals(BenchmarkOptions.class)) {
final BenchmarkOptions old = (BenchmarkOptions)a;
BenchmarkOptions replacement = getWrappedBenchmarkOptions(old, rounds);
modifiedAnnotations.add(replacement);
log.debug("Modified BenchmarkOptions annotation on {}", mname);
hit = true;
} else {
modifiedAnnotations.add(a);
log.debug("Kept annotation {} with annotation type {} on {}",
new Object[] { a, a.annotationType(), mname });
}
}
if (!hit) {
BenchmarkOptions opts = getDefaultBenchmarkOptions(rounds);
modifiedAnnotations.add(opts);
log.debug("Added BenchmarkOptions {} with annotation type {} to {}",
new Object[] { opts, opts.annotationType(), mname });
}
Description roundsAdjustedDesc =
Description.createTestDescription(
clazz, mname,