Used to annotate methods in the {@link org.slf4j.spi.LoggingEventBuilder} interface
+ * which return an instance of LoggingEventBuilder (usually as this
). Such
+ * methods should be followed by one of the terminating log()
methods returning
+ * void
.
Some IDEs such as IntelliJ IDEA support this annotation at compile time.
+ * + * @author Ceki Gülcü + * @since 2.0.0-beta1 + */ +@Documented +@Target( { ElementType.METHOD }) +@Retention(RetentionPolicy.RUNTIME) +public @interface CheckReturnValue { +} diff --git a/slf4j-api/src/main/java/org/slf4j/spi/LoggingEventBuilder.java b/slf4j-api/src/main/java/org/slf4j/spi/LoggingEventBuilder.java index bd921ac92..55e24cfb5 100755 --- a/slf4j-api/src/main/java/org/slf4j/spi/LoggingEventBuilder.java +++ b/slf4j-api/src/main/java/org/slf4j/spi/LoggingEventBuilder.java @@ -28,7 +28,7 @@ import org.slf4j.Marker; -import javax.annotation.CheckReturnValue; +import org.slf4j.helpers.CheckReturnValue; /** * This is the main interface in slf4j's fluent API for creating