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);
}
}