Ignore:
Timestamp:
2015-05-03T18:34:33+02:00 (9 years ago)
Author:
Don-vip
Message:

fix various Sonar issues:

  • squid:S1068: Unused private fields should be removed
  • squid:S1155: Collection.isEmpty() should be used to test for emptiness
  • squid:S1185: Overriding methods should do more than simply call the same method in the super class
  • squid:S1694: An abstract class should have both abstract and concrete methods
  • squid:S1905: Redundant casts should not be used
  • squid:S2065: Fields in non-serializable classes should not be "transient"
  • squid:S2583: Conditions should not unconditionally evaluate to "TRUE" or to "FALSE"
  • squid:ModifiersOrderCheck: Modifiers should be declared in the correct order
Location:
trunk/src/org/openstreetmap/josm/actions/mapmode
Files:
2 edited

Legend:

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

    r8308 r8318  
    612612            startImproving(wayList.get(0));
    613613            return;
    614         } else if (nodeList.size() > 0) {
     614        } else if (nodeList.size() == 1) {
    615615            // Starting improving the only way of the single selected node
    616             if (nodeList.size() == 1) {
    617                 List<OsmPrimitive> r = nodeList.get(0).getReferrers();
    618                 if (r.size() == 1 && (r.get(0) instanceof Way)) {
    619                     startImproving((Way) r.get(0));
    620                     return;
    621                 }
     616            List<OsmPrimitive> r = nodeList.get(0).getReferrers();
     617            if (r.size() == 1 && (r.get(0) instanceof Way)) {
     618                startImproving((Way) r.get(0));
     619                return;
    622620            }
    623621        }
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r8308 r8318  
    519519            // highlight it and adjust the cursor accordingly.
    520520            final boolean canMerge = ctrl && !getCurrentDataSet().getSelectedNodes().isEmpty();
    521             final OsmPrimitive p = canMerge ? (OsmPrimitive)findNodeToMergeTo(e.getPoint()) : null;
     521            final OsmPrimitive p = canMerge ? findNodeToMergeTo(e.getPoint()) : null;
    522522            boolean needsRepaint = removeHighlighting();
    523523            if(p != null) {
Note: See TracChangeset for help on using the changeset viewer.