Possible false positive with RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Hello,

I’m using Sonarqube 6.7.4, with java plugin version 5.11 (build 17289).
I’m currently meeting something I can’t explain that could look like a false positive to me.
Can you please have a look at it ?
Thank you

    public File downloadFileFromResponse(final Response response) throws ApiException {
        try {
            final File file = prepareDownloadFile(response);
            try (final BufferedSink sink = Okio.buffer(Okio.sink(file))) {
                sink.writeAll(response.body().source()); <-- Correctness - Nullcheck of sink previously dereferenced
            }
            return file;
        } catch (final IOException e) {
            throw new ApiException(e);
        }
    }

“RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE” looks like a spotbugs rule.

You should probably report that on their github repository.

Well indeed it looks like this issue : https://github.com/spotbugs/spotbugs/issues/756.