From 674db51505352c31368fbd57efc5ade47f35790e Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 8 Mar 2019 17:39:21 +0900 Subject: LogThreshold: Allow the annotation to be inherited With the current implementation the log threshold is only set when the annotation is done on the exact class, which means that in cases where an abstract test class is extended by several derived test classes, it is necessary to add the annotation on each derived class individually. Allow the annotation to be inherited, so that it is possible to only annotate the base class, and it will also be effective for all derived classes. Change-Id: I0501b2a617161a391478313b6f9891108bdf9969 --- java/com/google/gerrit/acceptance/LogThreshold.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/com/google/gerrit/acceptance/LogThreshold.java b/java/com/google/gerrit/acceptance/LogThreshold.java index da1fcc5c41..36831f3f1a 100644 --- a/java/com/google/gerrit/acceptance/LogThreshold.java +++ b/java/com/google/gerrit/acceptance/LogThreshold.java @@ -17,11 +17,13 @@ import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.Target; @Target({TYPE, METHOD}) @Retention(RUNTIME) +@Inherited public @interface LogThreshold { String level() default "DEBUG"; } -- cgit v1.2.3