{"action":"created","issue":{"url":"https://api.github.com/repos/spotbugs/spotbugs/issues/743","repository_url":"https://api.github.com/repos/spotbugs/spotbugs","labels_url":"https://api.github.com/repos/spotbugs/spotbugs/issues/743/labels{/name}","comments_url":"https://api.github.com/repos/spotbugs/spotbugs/issues/743/comments","events_url":"https://api.github.com/repos/spotbugs/spotbugs/issues/743/events","html_url":"https://github.com/spotbugs/spotbugs/issues/743","id":354786352,"node_id":"MDU6SXNzdWUzNTQ3ODYzNTI=","number":743,"title":"NP_NONNULL_PARAM_VIOLATION with Checker Framework @Nullable","user":{"login":"skitt","id":2128935,"node_id":"MDQ6VXNlcjIxMjg5MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/2128935?v=4","gravatar_id":"","url":"https://api.github.com/users/skitt","html_url":"https://github.com/skitt","followers_url":"https://api.github.com/users/skitt/followers","following_url":"https://api.github.com/users/skitt/following{/other_user}","gists_url":"https://api.github.com/users/skitt/gists{/gist_id}","starred_url":"https://api.github.com/users/skitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skitt/subscriptions","organizations_url":"https://api.github.com/users/skitt/orgs","repos_url":"https://api.github.com/users/skitt/repos","events_url":"https://api.github.com/users/skitt/events{/privacy}","received_events_url":"https://api.github.com/users/skitt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-28T15:33:19Z","updated_at":"2018-09-17T04:14:08Z","closed_at":null,"author_association":"NONE","body":"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:\r\n\r\n```\r\nimport com.google.common.util.concurrent.Futures;\r\nimport java.util.concurrent.Future;\r\n\r\npublic class Test {\r\n    private static final Future NULL_FUTURE = Futures.immediateFuture(null);\r\n}\r\n```\r\n\r\nwith the following POM:\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n    <modelVersion>4.0.0</modelVersion>\r\n\r\n    <groupId>org.sk2</groupId>\r\n    <artifactId>spotbugs-guava-test</artifactId>\r\n    <version>0.0.1-SNAPSHOT</version>\r\n\r\n    <dependencies>\r\n        <dependency>\r\n            <groupId>com.google.guava</groupId>\r\n            <artifactId>guava</artifactId>\r\n            <version>26.0-jre</version>\r\n        </dependency>\r\n    </dependencies>\r\n\r\n    <build>\r\n        <plugins>\r\n            <plugin>\r\n                <groupId>com.github.spotbugs</groupId>\r\n                <artifactId>spotbugs-maven-plugin</artifactId>\r\n                <version>3.1.6</version>\r\n                <configuration>\r\n                    <failOnError>true</failOnError>\r\n                </configuration>\r\n                <executions>\r\n                    <execution>\r\n                        <id>analyze-compile</id>\r\n                        <phase>compile</phase>\r\n                        <goals>\r\n                            <goal>check</goal>\r\n                        </goals>\r\n                    </execution>\r\n                </executions>\r\n            </plugin>\r\n        </plugins>\r\n    </build>\r\n</project>\r\n```\r\n\r\nresults in\r\n\r\n```\r\n[INFO] --- spotbugs-maven-plugin:3.1.6:check (analyze-compile) @ spotbugs-guava-test ---\r\n[INFO] BugInstance size is 1\r\n[INFO] Error size is 0\r\n[INFO] Total bugs: 1\r\n[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\r\n```\r\n\r\neven though ``immediateFuture`` is declared as\r\n\r\n```\r\npublic static <V> ListenableFuture<V> immediateFuture(@Nullable V value)\r\n```\r\n\r\nwith ``@Nullable`` from ``org.checkerframework.checker.nullness.qual`` (from Checker Framework 2.5.2).\r\n\r\nChanging the Guava version to 25.0-jre “fixes” the issue. (That version used ``@NullableDecl``.)"},"comment":{"url":"https://api.github.com/repos/spotbugs/spotbugs/issues/comments/421886930","html_url":"https://github.com/spotbugs/spotbugs/issues/743#issuecomment-421886930","issue_url":"https://api.github.com/repos/spotbugs/spotbugs/issues/743","id":421886930,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTg4NjkzMA==","user":{"login":"KengoTODA","id":505751,"node_id":"MDQ6VXNlcjUwNTc1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/505751?v=4","gravatar_id":"","url":"https://api.github.com/users/KengoTODA","html_url":"https://github.com/KengoTODA","followers_url":"https://api.github.com/users/KengoTODA/followers","following_url":"https://api.github.com/users/KengoTODA/following{/other_user}","gists_url":"https://api.github.com/users/KengoTODA/gists{/gist_id}","starred_url":"https://api.github.com/users/KengoTODA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KengoTODA/subscriptions","organizations_url":"https://api.github.com/users/KengoTODA/orgs","repos_url":"https://api.github.com/users/KengoTODA/repos","events_url":"https://api.github.com/users/KengoTODA/events{/privacy}","received_events_url":"https://api.github.com/users/KengoTODA/received_events","type":"User","site_admin":false},"created_at":"2018-09-17T04:14:08Z","updated_at":"2018-09-17T04:14:08Z","author_association":"MEMBER","body":"note: related change in Guava:\r\n\r\nhttps://github.com/google/guava/commit/0a2258e6691a22aa7ff2604871b520d44bbac01f#diff-5c3f56c125a86c8adde4e8754f104468"}}
{"actor":{"display_login":"KengoTODA"}}