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

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

Location:
trunk/src/org/openstreetmap/josm/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java

    r9621 r12279  
    107107                    progressMonitor.getWindowParent(),
    108108                    tr("Skip download"),
    109                     new String[] {
    110                         tr("Download Plugin"),
    111                         tr("Skip Download") }
     109                    tr("Download Plugin"), tr("Skip Download")
    112110            );
    113111            dialog.setContent(tr("JOSM version {0} required for plugin {1}.", pi.mainversion, pi.name));
    114             dialog.setButtonIcons(new String[] {"download", "cancel"});
    115             dialog.showDialog();
    116             int answer = dialog.getValue();
    117             if (answer != 1)
     112            dialog.setButtonIcons("download", "cancel");
     113            if (dialog.showDialog().getValue() != 1)
    118114                throw new PluginDownloadException(tr("Download skipped"));
    119115        }
     
    126122            URL url = new URL(pi.downloadlink);
    127123            synchronized (this) {
    128                 downloadConnection = HttpClient.create(url)
    129                         .setAccept(PLUGIN_MIME_TYPES);
     124                downloadConnection = HttpClient.create(url).setAccept(PLUGIN_MIME_TYPES);
    130125                downloadConnection.connect();
    131126            }
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r12273 r12279  
    8686        String inCore = tr("integrated into main program");
    8787
    88         DEPRECATED_PLUGINS = Arrays.asList(new DeprecatedPlugin[] {
     88        DEPRECATED_PLUGINS = Arrays.asList(
    8989            new DeprecatedPlugin("mappaint", inCore),
    9090            new DeprecatedPlugin("unglueplugin", inCore),
     
    136136            new DeprecatedPlugin("proj4j", inCore),
    137137            new DeprecatedPlugin("OpenStreetView", tr("replaced by new {0} plugin", "OpenStreetCam")),
    138             new DeprecatedPlugin("imageryadjust", inCore),
    139         });
     138            new DeprecatedPlugin("imageryadjust", inCore)
     139        );
    140140    }
    141141
Note: See TracChangeset for help on using the changeset viewer.