InputStream in = post(WebLibraryUrls.getStoryUrlCover(luid));
try {
Image img = new Image(in);
- if (img.getSize() > 0) {
+ if (img.getSize() == 0) {
img.close();
- return img;
+ img = null;
}
- return null;
+ return img;
} finally {
in.close();
}
InputStream in = post(WebLibraryUrls.getCoverUrlSource(source));
try {
Image img = new Image(in);
- if (img.getSize() > 0) {
+ if (img.getSize() == 0) {
img.close();
- return img;
+ img = null;
}
- return null;
+ return img;
} finally {
in.close();
}
InputStream in = post(WebLibraryUrls.getCoverUrlAuthor(author));
try {
Image img = new Image(in);
- if (img.getSize() > 0) {
+ if (img.getSize() == 0) {
img.close();
- return img;
+ img = null;
}
- return null;
+ return img;
} finally {
in.close();
}