You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm aware this is supposed to be fixed by #539, and I have also tried to create this as a failing test in spotbugs (without success). However, building the following code:
import com.google.common.util.concurrent.Futures;
import java.util.concurrent.Future;
public class Test {
private static final Future NULL_FUTURE = Futures.immediateFuture(null);
}
[INFO] --- spotbugs-maven-plugin:3.1.6:check (analyze-compile) @ spotbugs-guava-test ---
[INFO] BugInstance size is 1
[INFO] Error size is 0
[INFO] Total bugs: 1
[ERROR] Null passed for non-null parameter of com.google.common.util.concurrent.Futures.immediateFuture(Object) in Test.<static initializer for Test>() [Test] At Test.java:[line 5] NP_NONNULL_PARAM_VIOLATION
even though immediateFuture is declared as
public static <V> ListenableFuture<V> immediateFuture(@Nullable V value)
with @Nullable from org.checkerframework.checker.nullness.qual (from Checker Framework 2.5.2).
Changing the Guava version to 25.0-jre “fixes” the issue. (That version used @NullableDecl.)
The text was updated successfully, but these errors were encountered:
odl-github
pushed a commit
to opendaylight/odlparent
that referenced
this issue
Sep 13, 2018
This re-synchronizes the two files, so downstreams can switch from
findbugs to spotbugs without a regression. Upsteam issue is still
tracked at spotbugs/spotbugs#743.
Change-Id: Iaf1b240bfed2892726b062b91890a2083705438b
JIRA: ODLPARENT-161
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
I'm aware this is supposed to be fixed by #539, and I have also tried to create this as a failing test in spotbugs (without success). However, building the following code:
with the following POM:
results in
even though
immediateFuture
is declared aswith
@Nullable
fromorg.checkerframework.checker.nullness.qual
(from Checker Framework 2.5.2).Changing the Guava version to 25.0-jre “fixes” the issue. (That version used
@NullableDecl
.)The text was updated successfully, but these errors were encountered: