add CheckReturnValue annotation in org.slf4j.helpers

Signed-off-by: Ceki Gulcu <ceki@qos.ch>
This commit is contained in:
Ceki Gulcu 2022-08-06 22:44:44 +02:00
parent 0dcfa19040
commit 4e4e56a2df
3 changed files with 24 additions and 11 deletions

View File

@ -22,16 +22,6 @@
<module-name>org.slf4j</module-name>
</properties>
<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>

View File

@ -0,0 +1,23 @@
package org.slf4j.helpers;
import org.slf4j.Marker;
import java.lang.annotation.*;
/**
* <p>Used to annotate methods in the {@link org.slf4j.spi.LoggingEventBuilder} interface
* which return an instance of LoggingEventBuilder (usually as <code>this</code>). Such
* methods should be followed by one of the terminating <code>log()</code> methods returning
* <code>void</code>.</p>
*
* <p>Some IDEs such as IntelliJ IDEA support this annotation at compile time.</p>
*
* @author Ceki G&uuml;lc&uuml;
* @since 2.0.0-beta1
*/
@Documented
@Target( { ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
public @interface CheckReturnValue {
}

View File

@ -28,7 +28,7 @@ import java.util.function.Supplier;
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