Ignore:
Timestamp:
2017-05-30T15:12:36+02:00 (7 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/actions/SaveActionBase.java

    r10407 r12279  
    207207    public static boolean confirmOverwrite(File file) {
    208208        if (file == null || file.exists()) {
    209             ExtendedDialog dialog = new ExtendedDialog(
     209            return new ExtendedDialog(
    210210                    Main.parent,
    211211                    tr("Overwrite"),
    212                     new String[] {tr("Overwrite"), tr("Cancel")}
    213             );
    214             dialog.setContent(tr("File exists. Overwrite?"));
    215             dialog.setButtonIcons(new String[] {"save_as", "cancel"});
    216             dialog.showDialog();
    217             return dialog.getValue() == 1;
     212                    tr("Overwrite"), tr("Cancel"))
     213                .setContent(tr("File exists. Overwrite?"))
     214                .setButtonIcons("save_as", "cancel")
     215                .showDialog()
     216                .getValue() == 1;
    218217        }
    219218        return true;
Note: See TracChangeset for help on using the changeset viewer.