Skip to content

Commit

Permalink
add CheckReturnValue annotation in org.slf4j.helpers
Browse files Browse the repository at this point in the history
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
  • Loading branch information
ceki committed Aug 6, 2022
1 parent 0dcfa19 commit 4e4e56a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
10 changes: 0 additions & 10 deletions slf4j-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
23 changes: 23 additions & 0 deletions slf4j-api/src/main/java/org/slf4j/helpers/CheckReturnValue.java
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e4e56a

Please sign in to comment.