Skip to content

Commit 4e4e56a

Browse files
committedAug 6, 2022
add CheckReturnValue annotation in org.slf4j.helpers
Signed-off-by: Ceki Gulcu <[email protected]>
1 parent 0dcfa19 commit 4e4e56a

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed
 

‎slf4j-api/pom.xml

-10
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,6 @@
2222
<module-name>org.slf4j</module-name>
2323
</properties>
2424

25-
<dependencies>
26-
<dependency>
27-
<groupId>com.google.code.findbugs</groupId>
28-
<artifactId>jsr305</artifactId>
29-
<version>3.0.2</version>
30-
<optional>true</optional>
31-
</dependency>
32-
</dependencies>
33-
34-
3525
<build>
3626
<plugins>
3727
<plugin>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package org.slf4j.helpers;
2+
3+
4+
import org.slf4j.Marker;
5+
6+
import java.lang.annotation.*;
7+
8+
/**
9+
* <p>Used to annotate methods in the {@link org.slf4j.spi.LoggingEventBuilder} interface
10+
* which return an instance of LoggingEventBuilder (usually as <code>this</code>). Such
11+
* methods should be followed by one of the terminating <code>log()</code> methods returning
12+
* <code>void</code>.</p>
13+
*
14+
* <p>Some IDEs such as IntelliJ IDEA support this annotation at compile time.</p>
15+
*
16+
* @author Ceki G&uuml;lc&uuml;
17+
* @since 2.0.0-beta1
18+
*/
19+
@Documented
20+
@Target( { ElementType.METHOD })
21+
@Retention(RetentionPolicy.RUNTIME)
22+
public @interface CheckReturnValue {
23+
}

‎slf4j-api/src/main/java/org/slf4j/spi/LoggingEventBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
import org.slf4j.Marker;
3030

31-
import javax.annotation.CheckReturnValue;
31+
import org.slf4j.helpers.CheckReturnValue;
3232

3333
/**
3434
* This is the main interface in slf4j's fluent API for creating

0 commit comments

Comments
 (0)
Please sign in to comment.