mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use cache for all non-resource images
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user