Ignore:
Timestamp:
2013-09-08T05:51:16+02:00 (12 years ago)
Author:
Don-vip
Message:

Sonar - fix various violations

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserHistory.java

    r5923 r6223  
    5252        boolean add=true;
    5353
    54         if (historyPos >= 0 && historyPos < history.size() && history.get(historyPos).equals(url.toString())) {
     54        if (historyPos >= 0 && historyPos < history.size() && history.get(historyPos).equals(url)) {
    5555            add = false;
    5656        } else if (historyPos == history.size() -1) {
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java

    r6084 r6223  
    188188        @Override
    189189        public boolean evaluate(OsmPrimitive p) {
    190             if (hds.getHistory(p.getPrimitiveId()) == null)
     190            History h = hds.getHistory(p.getPrimitiveId());
     191            if (h == null)
    191192                // reload if the history is not in the cache yet
    192193                return true;
    193             else if (!p.isNew() && hds.getHistory(p.getPrimitiveId()).getByVersion(p.getUniqueId()) == null)
     194            else if (!p.isNew() && h.getByVersion(p.getUniqueId()) == null)
    194195                // reload if the history object of the selected object is not in the cache yet
    195196                return true;
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r6106 r6223  
    3333import java.util.Comparator;
    3434import java.util.Date;
     35import java.util.Dictionary;
    3536import java.util.Hashtable;
    3637import java.util.List;
     
    7374import org.openstreetmap.josm.gui.layer.Layer;
    7475import org.openstreetmap.josm.gui.widgets.JosmComboBox;
     76import org.openstreetmap.josm.gui.widgets.JosmTextField;
    7577import org.openstreetmap.josm.io.GpxReader;
    7678import org.openstreetmap.josm.tools.ExifReader;
     
    7981import org.openstreetmap.josm.tools.PrimaryDateParser;
    8082import org.xml.sax.SAXException;
    81 import org.openstreetmap.josm.gui.widgets.JosmTextField;
    8283
    8384/** This class displays the window to select the GPX file and the offset (timezone + delta).
     
    881882            final JSlider sldTimezone = new JSlider(-24, 24, 0);
    882883            sldTimezone.setPaintLabels(true);
    883             Hashtable<Integer,JLabel> labelTable = new Hashtable<Integer, JLabel>();
     884            Dictionary<Integer,JLabel> labelTable = new Hashtable<Integer, JLabel>();
    884885            labelTable.put(-24, new JLabel("-12:00"));
    885886            labelTable.put(-12, new JLabel( "-6:00"));
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r6084 r6223  
    201201            @Override
    202202            public boolean identify(TabPreferenceSetting tps, Object name) {
    203                 return name != null && tps != null && tps.getIconName() != null && tps.getIconName().equals(name);
     203                return name != null && tps != null && tps.getIconName() != null && name.equals(tps.getIconName());
    204204            }}, name);
    205205    }
Note: See TracChangeset for help on using the changeset viewer.