Skip to content

Commit a855dcf

Browse files
committed
Stopped infer from complaining.
1 parent c1290d6 commit a855dcf

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

.idea/misc.xml

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/me/aerovulpe/crawler/Utils.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ public void run() {
222222
} catch (IOException ignored) {
223223
}
224224
} finally {
225-
IOUtils.closeQuietly(outputStream);
225+
if (outputStream != null)
226+
try {
227+
outputStream.close();
228+
} catch (IOException ignored) {
229+
}
226230
}
227231
}
228232
}).start();

app/src/main/java/me/aerovulpe/crawler/ui/TouchImageView.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1363,11 +1363,12 @@ public static boolean saveGif(Context context, String url, File file)
13631363
streamEntry = GifThread.sGifCache
13641364
.getInputStream(url);
13651365
inputStream = streamEntry.getInputStream();
1366-
outputStream = new FileOutputStream(file);
1366+
outputStream = new FileOutputStream(file);
13671367
return IOUtils.copy(inputStream, outputStream) > 0;
13681368
} finally {
13691369
IOUtils.closeQuietly(inputStream);
1370-
IOUtils.closeQuietly(outputStream);
1370+
if (outputStream != null)
1371+
outputStream.close();
13711372
if (streamEntry != null)
13721373
streamEntry.close();
13731374
}

gradlew

100644100755
File mode changed.

0 commit comments

Comments
 (0)