Ignore:
Timestamp:
2016-03-26T14:45:25+01:00 (4 years ago)
Author:
Don-vip
Message:

sonar - squid:S2325 - "private" methods that don't access instance data should be "static"

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
6 edited

Legend:

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

    r8390 r10043  
    4747    }
    4848
    49     private Collection<Node> getSelectedNodes() {
     49    private static Collection<Node> getSelectedNodes() {
    5050        if (getCurrentDataSet() == null || getCurrentDataSet().getSelected() == null) {
    5151            return Collections.emptyList();
  • trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java

    r9968 r10043  
    6969     * @return Array of number of nodes to put in each arc
    7070     */
    71     private int[] distributeNodes(PolarNode[] angles, int nodesCount) {
     71    private static int[] distributeNodes(PolarNode[] angles, int nodesCount) {
    7272        int[] count = new int[angles.length];
    7373        double[] width = new double[angles.length];
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r10001 r10043  
    777777     * @throws IllegalArgumentException if parts is empty
    778778     */
    779     private List<WayInPolygon> markWayInsideSide(List<Way> parts, boolean isInner) {
     779    private static List<WayInPolygon> markWayInsideSide(List<Way> parts, boolean isInner) {
    780780
    781781        //prepare next map
     
    10261026     * @return the outermost Way.
    10271027     */
    1028     private List<PolygonLevel> findOuterWaysImpl(int level, Collection<AssembledPolygon> boundaryWays) {
     1028    private static List<PolygonLevel> findOuterWaysImpl(int level, Collection<AssembledPolygon> boundaryWays) {
    10291029
    10301030        //TODO: bad performance for deep nestings...
     
    12931293     * @return list of polygons, or null if too complex relation encountered.
    12941294     */
    1295     private List<Multipolygon> collectMultipolygons(Collection<Way> selectedWays) {
     1295    private static List<Multipolygon> collectMultipolygons(Collection<Way> selectedWays) {
    12961296
    12971297        List<Multipolygon> result = new ArrayList<>();
  • trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java

    r10001 r10043  
    367367     * @return List of ways to split
    368368     */
    369     private List<Way> getApplicableWays(List<Way> selectedWays, List<Node> selectedNodes) {
     369    private static List<Way> getApplicableWays(List<Way> selectedWays, List<Node> selectedNodes) {
    370370        if (selectedNodes.isEmpty())
    371371            return null;
  • trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java

    r8510 r10043  
    149149     * @return List of relevant ways
    150150     */
    151     private List<Way> getApplicableWays(List<Way> selectedWays, List<Node> selectedNodes) {
     151    private static List<Way> getApplicableWays(List<Way> selectedWays, List<Node> selectedNodes) {
    152152        if (selectedNodes.isEmpty())
    153153            return null;
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r9989 r10043  
    869869    }
    870870
    871     private boolean movesHiddenWay() {
     871    private static boolean movesHiddenWay() {
    872872        final Collection<OsmPrimitive> elementsToTest = new HashSet<>(getCurrentDataSet().getSelected());
    873873        for (Way osm : Utils.filteredCollection(getCurrentDataSet().getSelected(), Way.class)) {
Note: See TracChangeset for help on using the changeset viewer.