summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2019-03-08 17:39:21 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2019-03-08 09:50:10 +0000
commit674db51505352c31368fbd57efc5ade47f35790e (patch)
tree32be7b492c4e8b841f052304348a2397b718513c
parenta9a7a6fd1e9ad39a13fef5e897dc6d932a3282e1 (diff)
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
-rw-r--r--java/com/google/gerrit/acceptance/LogThreshold.java2
1 files changed, 2 insertions, 0 deletions
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";
}