Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r10895 r11021 766 766 767 767 /** 768 * Clears the internal image cache. 769 * @since 11021 770 */ 771 public static void clearCache() { 772 synchronized (cache) { 773 cache.clear(); 774 } 775 } 776 777 /** 768 778 * Internal implementation of the image request. 769 779 * -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java
r10994 r11021 24 24 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource; 25 25 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry; 26 import org.openstreetmap.josm.tools.ImageProvider; 26 27 27 28 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 53 54 @Test 54 55 public void testValidityOfAvailableStyles() throws Exception { 56 ImageProvider.clearCache(); 55 57 Collection<ExtendedSourceEntry> sources = new MapPaintPreference.MapPaintSourceEditor() 56 58 .loadAndGetAvailableSources(); … … 97 99 } 98 100 } 101 ImageProvider.clearCache(); 99 102 assertTrue(allErrors.toString()+"\n"+allWarnings.toString(), allErrors.isEmpty() && allWarnings.isEmpty()); 100 103 } -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java
r10994 r11021 20 20 import org.openstreetmap.josm.gui.tagging.presets.TaggingPreset; 21 21 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetReader; 22 import org.openstreetmap.josm.tools.ImageProvider; 22 23 import org.xml.sax.SAXException; 23 24 … … 50 51 @Test 51 52 public void testValidityOfAvailablePresets() throws Exception { 53 ImageProvider.clearCache(); 52 54 Collection<ExtendedSourceEntry> sources = new TaggingPresetPreference.TaggingPresetSourceEditor() 53 55 .loadAndGetAvailableSources(); … … 84 86 } 85 87 } 88 ImageProvider.clearCache(); 86 89 assertTrue(allErrors.toString(), allErrors.isEmpty()); 87 90 assertTrue(allMessages.toString(), allMessages.isEmpty());
Note:
See TracChangeset
for help on using the changeset viewer.