We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b1e588 commit d872c24Copy full SHA for d872c24
library/src/com/nostra13/universalimageloader/utils/IoUtils.java
@@ -104,18 +104,18 @@ public static void readAndCloseStream(InputStream is) {
104
final byte[] bytes = new byte[DEFAULT_BUFFER_SIZE];
105
try {
106
while (is.read(bytes, 0, DEFAULT_BUFFER_SIZE) != -1);
107
- } catch (IOException e) {
108
- // Do nothing
+ } catch (IOException ignored) {
109
} finally {
110
closeSilently(is);
111
}
112
113
114
public static void closeSilently(Closeable closeable) {
115
- try {
116
- closeable.close();
117
- } catch (Exception e) {
118
+ if (closeable != null) {
+ try {
+ closeable.close();
+ } catch (Exception ignored) {
+ }
119
120
121
0 commit comments