Changeset 6361 in josm for trunk/src


Ignore:
Timestamp:
2013-11-03T00:19:32+01:00 (11 years ago)
Author:
Don-vip
Message:

Sonar/Findbugs - Unused formal parameter

Location:
trunk/src/org/openstreetmap/josm
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java

    r6310 r6361  
    223223        ImageryType t = ImageryType.fromUrlString(type);
    224224        this.cookies=cookies;
     225        this.eulaAcceptanceRequired = eulaAcceptanceRequired;
    225226        if (t != null) {
    226227            this.imageryType = t;
  • trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java

    r6084 r6361  
    2929        final SelectionChangedListener listener;
    3030
    31         public ListenerInfo(SelectionChangedListener listener, boolean consolidate) {
     31        public ListenerInfo(SelectionChangedListener listener) {
    3232            this.listener = listener;
    3333        }
     
    4848    private final CopyOnWriteArrayList<ListenerInfo> normalListeners = new CopyOnWriteArrayList<ListenerInfo>();
    4949
     50    /**
     51     * Constructs a new {@code SelectionEventManager}.
     52     */
    5053    public SelectionEventManager() {
    5154        DataSet.addSelectionListener(this);
     
    5659            throw new UnsupportedOperationException("IN_EDT mode not supported, you probably want to use IN_EDT_CONSOLIDATED.");
    5760        if (fireMode == FireMode.IN_EDT || fireMode == FireMode.IN_EDT_CONSOLIDATED) {
    58             inEDTListeners.addIfAbsent(new ListenerInfo(listener, fireMode == FireMode.IN_EDT_CONSOLIDATED));
     61            inEDTListeners.addIfAbsent(new ListenerInfo(listener));
    5962        } else {
    60             normalListeners.addIfAbsent(new ListenerInfo(listener, false));
     63            normalListeners.addIfAbsent(new ListenerInfo(listener));
    6164        }
    6265    }
    6366
    6467    public void removeSelectionListener(SelectionChangedListener listener) {
    65         ListenerInfo searchListener = new ListenerInfo(listener, false);
     68        ListenerInfo searchListener = new ListenerInfo(listener);
    6669        inEDTListeners.remove(searchListener);
    6770        normalListeners.remove(searchListener);
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r6296 r6361  
    220220        LayerListDialog.createInstance(this);
    221221        addToggleDialog(LayerListDialog.getInstance());
    222         addToggleDialog(propertiesDialog = new PropertiesDialog(this));
     222        addToggleDialog(propertiesDialog = new PropertiesDialog());
    223223        addToggleDialog(selectionListDialog = new SelectionListDialog());
    224224        addToggleDialog(relationListDialog = new RelationListDialog());
    225         addToggleDialog(new CommandStackDialog(this));
     225        addToggleDialog(new CommandStackDialog());
    226226        addToggleDialog(new UserListDialog());
    227227        addToggleDialog(new HistoryDialog(), true);
     
    229229        addToggleDialog(validatorDialog = new ValidatorDialog());
    230230        addToggleDialog(filterDialog = new FilterDialog());
    231         addToggleDialog(new ChangesetDialog(this), true);
     231        addToggleDialog(new ChangesetDialog(), true);
    232232        addToggleDialog(new MapPaintDialog());
    233233        toolBarToggle.setFloatable(false);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java

    r6336 r6361  
    4141import org.openstreetmap.josm.data.osm.event.DatasetEventManager;
    4242import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
    43 import org.openstreetmap.josm.gui.MapFrame;
    4443import org.openstreetmap.josm.gui.MapView;
    4544import org.openstreetmap.josm.gui.SideButton;
     
    243242    }
    244243
    245     public ChangesetDialog(MapFrame mapFrame) {
     244    /**
     245     * Constructs a new {@code ChangesetDialog}.
     246     */
     247    public ChangesetDialog() {
    246248        super(
    247249                tr("Changesets"),
  • trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java

    r6336 r6361  
    4040import org.openstreetmap.josm.command.PseudoCommand;
    4141import org.openstreetmap.josm.data.osm.OsmPrimitive;
    42 import org.openstreetmap.josm.gui.MapFrame;
    4342import org.openstreetmap.josm.gui.SideButton;
    4443import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    7675    private SelectAndZoomAction selectAndZoomAction = new SelectAndZoomAction();
    7776
    78     public CommandStackDialog(final MapFrame mapFrame) {
     77    /**
     78     * Constructs a new {@code CommandStackDialog}.
     79     */
     80    public CommandStackDialog() {
    7981        super(tr("Command Stack"), "commandstack", tr("Open a list of all commands (undo buffer)."),
    8082                Shortcut.registerShortcut("subwindow:commandstack", tr("Toggle: {0}",
     
    340342    public class SelectAction extends AbstractAction implements IEnabledStateUpdating {
    341343
     344        /**
     345         * Constructs a new {@code SelectAction}.
     346         */
    342347        public SelectAction() {
    343             super();
    344348            putValue(NAME,tr("Select"));
    345349            putValue(SHORT_DESCRIPTION, tr("Selects the objects that take part in this command (unless currently deleted)"));
    346350            putValue(SMALL_ICON, ImageProvider.get("dialogs","select"));
    347 
    348351        }
    349352
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java

    r6101 r6361  
    163163
    164164    public LatLonDialog(Component parent, String title, String help) {
    165         super(Main.parent, tr("Add Node..."), new String[] { tr("Ok"), tr("Cancel") });
     165        super(parent, title, new String[] { tr("Ok"), tr("Cancel") });
    166166        setButtonIcons(new String[] { "ok", "cancel" });
    167         configureContextsensitiveHelp("/Action/AddNode", true);
     167        configureContextsensitiveHelp(help, true);
    168168
    169169        build();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r6248 r6361  
    195195        setMinimumSize(new Dimension(0,0));
    196196        this.preferredHeight = preferredHeight;
    197         toggleAction = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, shortcut, iconName);
     197        toggleAction = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, shortcut);
    198198        String helpId = "Dialog/"+getClass().getName().substring(getClass().getName().lastIndexOf('.')+1);
    199199        toggleAction.putValue("help", helpId.substring(0, helpId.length()-6));
     
    229229    public final class ToggleDialogAction extends JosmAction {
    230230
    231         private ToggleDialogAction(String name, String iconName, String tooltip, Shortcut shortcut, String prefname) {
     231        private ToggleDialogAction(String name, String iconName, String tooltip, Shortcut shortcut) {
    232232            super(name, iconName, tooltip, shortcut, false);
    233233        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r6070 r6361  
    126126            @Override
    127127            public void actionPerformed(ActionEvent e) {
    128                 fixErrors(e);
     128                fixErrors();
    129129            }
    130130        });
     
    141141                @Override
    142142                public void actionPerformed(ActionEvent e) {
    143                     ignoreErrors(e);
     143                    ignoreErrors();
    144144                }
    145145            });
     
    183183    /**
    184184     * Fix selected errors
    185      *
    186      * @param e
    187185     */
    188186    @SuppressWarnings("unchecked")
    189     private void fixErrors(ActionEvent e) {
     187    private void fixErrors() {
    190188        TreePath[] selectionPaths = tree.getSelectionPaths();
    191189        if (selectionPaths == null)
     
    224222    /**
    225223     * Set selected errors to ignore state
    226      *
    227      * @param e
    228224     */
    229225    @SuppressWarnings("unchecked")
    230     private void ignoreErrors(ActionEvent e) {
     226    private void ignoreErrors() {
    231227        int asked = JOptionPane.DEFAULT_OPTION;
    232228        boolean changed = false;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r6336 r6361  
    7777import org.openstreetmap.josm.gui.DefaultNameFormatter;
    7878import org.openstreetmap.josm.gui.ExtendedDialog;
    79 import org.openstreetmap.josm.gui.MapFrame;
    8079import org.openstreetmap.josm.gui.MapView;
    8180import org.openstreetmap.josm.gui.PopupMenuHandler;
     
    222221    /**
    223222     * Create a new PropertiesDialog
    224      * @param mapFrame The parent map fram
    225      */
    226     public PropertiesDialog(MapFrame mapFrame) {
     223     */
     224    public PropertiesDialog() {
    227225        super(tr("Tags/Memberships"), "propertiesdialog", tr("Tags for selected objects."),
    228226                Shortcut.registerShortcut("subwindow:properties", tr("Toggle: {0}", tr("Tags/Memberships")), KeyEvent.VK_P,
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java

    r6316 r6361  
    5757import org.openstreetmap.josm.actions.CopyAction;
    5858import org.openstreetmap.josm.actions.JosmAction;
    59 import org.openstreetmap.josm.actions.PasteTagsAction.TagPaster;
    6059import org.openstreetmap.josm.command.AddCommand;
    6160import org.openstreetmap.josm.command.ChangeCommand;
     
    8079import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    8180import org.openstreetmap.josm.gui.tagging.TagEditorPanel;
    82 import org.openstreetmap.josm.gui.tagging.TagModel;
    8381import org.openstreetmap.josm.gui.tagging.TaggingPreset;
    8482import org.openstreetmap.josm.gui.tagging.TaggingPresetType;
     
    182180        JTabbedPane tabbedPane = new JTabbedPane();
    183181        tabbedPane.add(tr("Tags and Members"), pnl);
    184         referrerBrowser = new ReferringRelationsBrowser(getLayer(), referrerModel, this);
     182        referrerBrowser = new ReferringRelationsBrowser(getLayer(), referrerModel);
    185183        tabbedPane.add(tr("Parent Relations"), referrerBrowser);
    186184        tabbedPane.add(tr("Child Relations"), new ChildRelationBrowser(getLayer(), relation));
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java

    r6316 r6361  
    8181        parents = new ArrayList<Relation>();
    8282        this.child = child;
     83        this.full = full;
    8384    }
    8485
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java

    r6084 r6361  
    6868    }
    6969
    70     public ReferringRelationsBrowser(OsmDataLayer layer, ReferringRelationsBrowserModel model, GenericRelationEditor relationEditor) {
     70    public ReferringRelationsBrowser(OsmDataLayer layer, ReferringRelationsBrowserModel model) {
    7171        this.model = model;
    7272        this.layer = layer;
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java

    r6203 r6361  
    9797    }
    9898
    99     private Component buildSettingsPanel(final PreferenceTabbedPane gui) {
     99    private Component buildSettingsPanel() {
    100100        final JPanel p = new JPanel(new GridBagLayout());
    101101        p.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
     
    118118        imageryProviders = new ImageryProvidersPanel(gui, layerInfo);
    119119        pane.addTab(tr("Imagery providers"), imageryProviders);
    120         pane.addTab(tr("Settings"), buildSettingsPanel(gui));
     120        pane.addTab(tr("Settings"), buildSettingsPanel());
    121121        pane.addTab(tr("Offset bookmarks"), new OffsetBookmarksPanel(gui));
    122122        loadSettings();
  • trunk/src/org/openstreetmap/josm/gui/util/StayOpenRadioButtonMenuItem.java

    r5094 r6361  
    4242   */
    4343  public StayOpenRadioButtonMenuItem(Action a) {
    44     super();
     44    super(a);
    4545  }
    4646
  • trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java

    r5881 r6361  
    103103    public OsmServerBackreferenceReader(long id, OsmPrimitiveType type, boolean readFull) throws IllegalArgumentException  {
    104104        this(id, type);
    105         this.readFull = false;
     105        this.readFull = readFull;
    106106    }
    107107
Note: See TracChangeset for help on using the changeset viewer.