Ignore:
Timestamp:
2017-05-30T15:12:36+02:00 (3 years ago)
Author:
Don-vip
Message:

sonar - squid:S3878 - Arrays should not be created for varargs parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java

    r11746 r12279  
    3333
    3434import javax.swing.GrayFilter;
    35 import javax.swing.Icon;
    3635import javax.swing.ImageIcon;
    3736import javax.swing.JComponent;
     
    197196    public static boolean warnUser(String title, String content, ImageIcon baseActionIcon, String continueToolTip) {
    198197        ExtendedDialog dlg = new ExtendedDialog(Main.parent,
    199                 title, new String[] {tr("Cancel"), tr("Continue")});
     198                title, tr("Cancel"), tr("Continue"));
    200199        dlg.setContent(content);
    201         dlg.setButtonIcons(new Icon[] {
     200        dlg.setButtonIcons(
    202201                    new ImageProvider("cancel").setMaxSize(ImageSizes.LARGEICON).get(),
    203202                    new ImageProvider("upload").setMaxSize(ImageSizes.LARGEICON).addOverlay(
    204                             new ImageOverlay(new ImageProvider("warning-small"), 0.5, 0.5, 1.0, 1.0)).get()});
    205         dlg.setToolTipTexts(new String[] {
    206                 tr("Cancel"),
    207                 continueToolTip});
     203                            new ImageOverlay(new ImageProvider("warning-small"), 0.5, 0.5, 1.0, 1.0)).get());
     204        dlg.setToolTipTexts(tr("Cancel"), continueToolTip);
    208205        dlg.setIcon(JOptionPane.WARNING_MESSAGE);
    209206        dlg.setCancelButton(1);
     
    227224        p.add(sp, GBC.eol().fill(GBC.BOTH));
    228225
    229         ExtendedDialog ed = new ExtendedDialog(parent, title, new String[] {tr("OK")});
    230         ed.setButtonIcons(new String[] {"ok.png"});
     226        ExtendedDialog ed = new ExtendedDialog(parent, title, tr("OK"));
     227        ed.setButtonIcons("ok");
    231228        ed.setContent(p);
    232229        ed.showDialog();
Note: See TracChangeset for help on using the changeset viewer.