Skip to content

Commit

Permalink
fix for SpotBugs - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
miryamfoiferCX committed Nov 24, 2024
1 parent 7e273b6 commit f3f2da9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ public static void copyURLToFile(URL source, String proxyStr, File destination,
Request request = new Request.Builder().url(source).build();
Response response = client.newCall(request).execute();
ResponseBody responseBody = response.body();
if (responseBody == null) {
throw new IOException("Response body is null");
}
InputStream stream = responseBody.byteStream();
try {
FileUtils.copyInputStreamToFile(stream, destination);
Expand Down

0 comments on commit f3f2da9

Please sign in to comment.