Changeset 18121 in josm for trunk


Ignore:
Timestamp:
2021-08-04T21:41:08+02:00 (3 years ago)
Author:
Don-vip
Message:

see #21176 - fix error-prone warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java

    r18107 r18121  
    493493        private void attachImageIcon(String key, ImageSizes size, ImageResource uploadImg, ImageResource saveImg, ImageResource actionImg) {
    494494            Dimension dim = size.getImageDimension();
    495             BufferedImage newIco = new BufferedImage((int) dim.getWidth()*3, (int) dim.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
     495            BufferedImage newIco = new BufferedImage(((int) dim.getWidth())*3, (int) dim.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
    496496            Graphics2D g = newIco.createGraphics();
    497497            drawImageIcon(g, 0, dim, uploadImg);
     
    503503        private void drawImageIcon(Graphics2D g, int index, Dimension dim, ImageResource img) {
    504504            if (img != null) {
    505                 g.drawImage(img.getImageIcon(dim).getImage(), (int) dim.getWidth()*index, 0, (int) dim.getWidth(), (int) dim.getHeight(), null);
     505                g.drawImage(img.getImageIcon(dim).getImage(),
     506                        ((int) dim.getWidth())*index, 0, (int) dim.getWidth(), (int) dim.getHeight(), null);
    506507            }
    507508        }
Note: See TracChangeset for help on using the changeset viewer.