Changeset 17074 in josm


Ignore:
Timestamp:
2020-09-29T22:14:14+02:00 (7 months ago)
Author:
Don-vip
Message:

see #19706, see #19725 - PMD - avoid throwing NPE

File:
1 edited

Legend:

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

    r16998 r17074  
    9090     * @param sourceIcon the source icon to draw
    9191     * @return a new buffered image
     92     * @throws IllegalArgumentException if renderer or sourceIcon is null
    9293     */
    9394    BufferedImage createBufferedImage(Dimension dim, Dimension icon, Consumer<Graphics2D> renderer, Image sourceIcon) {
     
    103104            g.drawImage(sourceIcon, 0, 0, null);
    104105        } else {
    105             throw new NullPointerException("renderer or sourceIcon");
     106            throw new IllegalArgumentException("renderer or sourceIcon");
    106107        }
    107108        return bufferedImage;
Note: See TracChangeset for help on using the changeset viewer.