Ignore:
Timestamp:
2014-12-20T16:00:06+01:00 (9 years ago)
Author:
Don-vip
Message:

fix various Sonar issues, improve Javadoc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r7749 r7859  
    5555        /* I18N: Command to download a specific location/URL */
    5656        super(tr("Open Location..."), "openlocation", tr("Open an URL."),
    57                 Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")), KeyEvent.VK_L, Shortcut.CTRL), true);
     57                Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")),
     58                        KeyEvent.VK_L, Shortcut.CTRL), true);
    5859        putValue("help", ht("/Action/OpenLocation"));
    5960        this.downloadTasks = new ArrayList<>();
     
    7475     */
    7576    protected void restoreUploadAddressHistory(HistoryComboBox cbHistory) {
    76         List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(getClass().getName() + ".uploadAddressHistory", new LinkedList<String>()));
     77        List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(getClass().getName() + ".uploadAddressHistory",
     78                new LinkedList<String>()));
    7779        // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
    7880        //
     
    175177    /**
    176178     * Open the given URL.
    177      * @param new_layer true if the URL needs to be opened in a new layer, false otherwise
     179     * @param newLayer true if the URL needs to be opened in a new layer, false otherwise
    178180     * @param url The URL to open
    179181     */
    180     public void openUrl(boolean new_layer, final String url) {
     182    public void openUrl(boolean newLayer, final String url) {
    181183        PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Download Data"));
    182184        Collection<DownloadTask> tasks = findDownloadTasks(url, false);
     
    187189            try {
    188190                task = tasks.iterator().next();
    189                 future = task.loadUrl(new_layer, url, monitor);
     191                future = task.loadUrl(newLayer, url, monitor);
    190192            } catch (IllegalArgumentException e) {
    191193                Main.error(e);
Note: See TracChangeset for help on using the changeset viewer.