Ignore:
Timestamp:
2020-07-14T20:19:40+02:00 (4 years ago)
Author:
simon04
Message:

fix #19449 ImageProviderTest.testGetPadded has slow startup, and a race condition (patch by johsin18, modified)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java

    r16699 r16768  
    229229        File arch = TaggingPresetReader.getZipIcons();
    230230        final Collection<String> s = Config.getPref().getList("taggingpreset.icon.sources", null);
    231         this.iconFuture = new ImageProvider(iconName)
     231        this.iconFuture = new CompletableFuture<>();
     232        new ImageProvider(iconName)
    232233            .setDirs(s)
    233234            .setId("presets")
     
    242243                            Logging.warn(toString() + ": " + PRESET_ICON_ERROR_MSG_PREFIX + iconName);
    243244                            Logging.warn(e);
     245                        } finally {
     246                            iconFuture.complete(null);
    244247                        }
    245248                    });
    246249                } else {
    247250                    Logging.warn(toString() + ": " + PRESET_ICON_ERROR_MSG_PREFIX + iconName);
     251                    iconFuture.complete(null);
    248252                }
    249253            });
Note: See TracChangeset for help on using the changeset viewer.