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

Location:
trunk/src/org/openstreetmap/josm/io
Files:
5 edited

Legend:

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

    r11100 r12279  
    146146        proxyExceptions = new HashSet<>(
    147147            Main.pref.getCollection(ProxyPreferencesPanel.PROXY_EXCEPTIONS,
    148                     Arrays.asList(new String[]{"localhost", IPV4_LOOPBACK, IPV6_LOOPBACK}))
     148                    Arrays.asList("localhost", IPV4_LOOPBACK, IPV6_LOOPBACK))
    149149        );
    150150    }
  • trunk/src/org/openstreetmap/josm/io/GpxExporter.java

    r11620 r12279  
    148148        ExtendedDialog ed = new ExtendedDialog(Main.parent,
    149149                tr("Export options"),
    150                 new String[] {tr("Export and Save"), tr("Cancel")});
    151         ed.setButtonIcons(new String[] {"exportgpx", "cancel"});
    152         ed.setContent(p);
    153         ed.showDialog();
    154 
    155         if (ed.getValue() != 1) {
     150                tr("Export and Save"), tr("Cancel"))
     151            .setButtonIcons("exportgpx", "cancel")
     152            .setContent(p);
     153
     154        if (ed.showDialog().getValue() != 1) {
    156155            setCanceled(true);
    157156            return;
  • trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java

    r12259 r12279  
    171171                break;
    172172            case MIRROR:
    173                 if (Arrays.asList(new String[] {
     173                if (Arrays.asList(
    174174                        "type",
    175175                        "url",
    176176                        MIN_ZOOM,
    177177                        MAX_ZOOM,
    178                         TILE_SIZE,
    179                 }).contains(qName)) {
     178                        TILE_SIZE
     179                ).contains(qName)) {
    180180                    newState = State.MIRROR_ATTRIBUTE;
    181181                    lang = atts.getValue("lang");
     
    186186                break;
    187187            case ENTRY:
    188                 if (Arrays.asList(new String[] {
     188                if (Arrays.asList(
    189189                        "name",
    190190                        "id",
     
    207207                        "date",
    208208                        TILE_SIZE,
    209                         "valid-georeference",
    210                 }).contains(qName)) {
     209                        "valid-georeference"
     210                ).contains(qName)) {
    211211                    newState = State.ENTRY_ATTRIBUTE;
    212212                    lang = atts.getValue("lang");
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java

    r11452 r12279  
    140140                false,
    141141                true);
    142         setToolTipTexts(new String[]{tr("Add checked tags to selected objects"), tr("Shift+Enter: Add all tags to selected objects"), ""});
     142        setToolTipTexts(tr("Add checked tags to selected objects"), tr("Shift+Enter: Add all tags to selected objects"), "");
    143143
    144144        this.sender = senderName;
  • trunk/src/org/openstreetmap/josm/io/session/SessionReader.java

    r11848 r12279  
    567567                            Main.parent,
    568568                            title,
    569                             new String[] {tr("Cancel"), tr("Skip layer and continue")}
    570                             );
    571                     dlg.setButtonIcons(new String[] {"cancel", "dialogs/next"});
    572                     dlg.setIcon(icon);
    573                     dlg.setContent(message);
    574                     dlg.showDialog();
    575                     cancel = dlg.getValue() != 2;
     569                            tr("Cancel"), tr("Skip layer and continue"))
     570                        .setButtonIcons("cancel", "dialogs/next")
     571                        .setIcon(icon)
     572                        .setContent(message);
     573                    cancel = dlg.showDialog().getValue() != 2;
    576574                });
    577575            } catch (InvocationTargetException | InterruptedException ex) {
Note: See TracChangeset for help on using the changeset viewer.