Ignore:
Timestamp:
2015-05-22T01:06:28+02:00 (10 years ago)
Author:
Don-vip
Message:

ExecutorService field doesn't ever get shutdown

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r8404 r8412  
    16121612     * @return The same image as {@code bi} where all pixels of the given color are transparent.
    16131613     * This resulting image has also the special property {@link #PROP_TRANSPARENCY_FORCED} set to {@code color}
    1614      * @since 7132
    16151614     * @see BufferedImage#getProperty
    16161615     * @see #isTransparencyForced
     1616     * @since 7132
    16171617     */
    16181618    public static BufferedImage makeImageTransparent(BufferedImage bi, Color color) {
     
    16531653     * @param bi The {@code BufferedImage} to test
    16541654     * @return {@code true} if the transparency of {@code bi} has been enforced by a previous call to {@code makeImageTransparent}.
     1655     * @see #makeImageTransparent
    16551656     * @since 7132
    1656      * @see #makeImageTransparent
    16571657     */
    16581658    public static boolean isTransparencyForced(BufferedImage bi) {
     
    16641664     * @param bi The {@code BufferedImage} to test
    16651665     * @return {@code true} if {@code bi} has a transparent color determined by a previous call to {@code read}.
     1666     * @see #read
    16661667     * @since 7132
    1667      * @see #read
    16681668     */
    16691669    public static boolean hasTransparentColor(BufferedImage bi) {
    16701670        return bi != null && !bi.getProperty(PROP_TRANSPARENCY_COLOR).equals(Image.UndefinedProperty);
    16711671    }
     1672
     1673    /**
     1674     * Shutdown background image fetcher.
     1675     * @param now if {@code true}, attempts to stop all actively executing tasks, halts the processing of waiting tasks.
     1676     * if {@code false}, initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted
     1677     * @since 8412
     1678     */
     1679    public static void shutdown(boolean now) {
     1680        if (now) {
     1681            IMAGE_FETCHER.shutdownNow();
     1682        } else {
     1683            IMAGE_FETCHER.shutdown();
     1684        }
     1685    }
    16721686}
Note: See TracChangeset for help on using the changeset viewer.