Decorate all Assert implementations with @CheckReturnValue

See gh-46766

Signed-off-by: Stefano Cordio <stefano.cordio@gmail.com>
This commit is contained in:
Stefano Cordio
2025-12-19 10:39:37 +01:00
committed by Stéphane Nicoll
parent 458f7f6ac9
commit b2b0fed285
14 changed files with 164 additions and 10 deletions
@@ -24,6 +24,7 @@ import java.util.concurrent.TimeUnit;
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.Assert;
import org.springframework.lang.CheckReturnValue;
import org.springframework.util.ReflectionUtils;
/**
@@ -85,6 +86,7 @@ public final class ScheduledExecutorServiceAssert
* @param actual the {@link ScheduledExecutorService}
* @return the assertion instance
*/
@CheckReturnValue
public static ScheduledExecutorServiceAssert assertThat(ScheduledExecutorService actual) {
return new ScheduledExecutorServiceAssert(actual);
}
@@ -22,6 +22,7 @@ import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.Assert;
import org.springframework.core.task.SimpleAsyncTaskExecutor;
import org.springframework.lang.CheckReturnValue;
import org.springframework.util.ReflectionUtils;
/**
@@ -77,6 +78,7 @@ public final class SimpleAsyncTaskExecutorAssert
* @param actual the {@link SimpleAsyncTaskExecutor}
* @return the assertion instance
*/
@CheckReturnValue
public static SimpleAsyncTaskExecutorAssert assertThat(SimpleAsyncTaskExecutor actual) {
return new SimpleAsyncTaskExecutorAssert(actual);
}