diff --git a/slf4j-api/pom.xml b/slf4j-api/pom.xml index c5a909bb1..1fadd9df8 100755 --- a/slf4j-api/pom.xml +++ b/slf4j-api/pom.xml @@ -22,16 +22,6 @@ org.slf4j - - - com.google.code.findbugs - jsr305 - 3.0.2 - true - - - - diff --git a/slf4j-api/src/main/java/org/slf4j/helpers/CheckReturnValue.java b/slf4j-api/src/main/java/org/slf4j/helpers/CheckReturnValue.java new file mode 100644 index 000000000..39ef64ceb --- /dev/null +++ b/slf4j-api/src/main/java/org/slf4j/helpers/CheckReturnValue.java @@ -0,0 +1,23 @@ +package org.slf4j.helpers; + + +import org.slf4j.Marker; + +import java.lang.annotation.*; + +/** + *

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