Changeset 10731 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-08-04T22:38:02+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r10714 r10731 635 635 */ 636 636 public CompletableFuture<ImageIcon> getAsync() { 637 return CompletableFuture.supplyAsync(this::get, IMAGE_FETCHER); 637 return name.startsWith(HTTP_PROTOCOL) || name.startsWith(WIKI_PROTOCOL) 638 ? CompletableFuture.supplyAsync(this::get, IMAGE_FETCHER) 639 : CompletableFuture.completedFuture(get()); 638 640 } 639 641 … … 676 678 * @since 10714 677 679 */ 678 public CompletableFuture<ImageResource> getResourceAsync() { 679 return CompletableFuture.supplyAsync(this::getResource, IMAGE_FETCHER); 680 public CompletableFuture<ImageResource> getResourceAsync() { 681 return name.startsWith(HTTP_PROTOCOL) || name.startsWith(WIKI_PROTOCOL) 682 ? CompletableFuture.supplyAsync(this::getResource, IMAGE_FETCHER) 683 : CompletableFuture.completedFuture(getResource()); 680 684 } 681 685
Note:
See TracChangeset
for help on using the changeset viewer.