use cache for all non-resource images

This commit is contained in:
Gregory.Shrago
2016-06-15 14:39:47 +03:00
parent fe5ed34485
commit dc7595329d
@@ -96,15 +96,15 @@ public class ImageLoader implements Serializable {
if (stream == null) return null;
}
if (stream == null) {
cacheKey = path;
Image image = ourCache.get(cacheKey);
if (image != null) return image;
url = new URL(path);
URLConnection connection = url.openConnection();
if (connection instanceof HttpURLConnection) {
if (!original) return null;
connection.addRequestProperty("User-Agent", "IntelliJ");
cacheKey = path;
Image image = ourCache.get(cacheKey);
if (image != null) return image;
}
stream = connection.getInputStream();
}