Ignore:
Timestamp:
2015-04-28T00:49:49+02:00 (6 years ago)
Author:
Don-vip
Message:

fix sonar squid:S2039 - Member variable visibility should be specified

Location:
trunk/src/org/openstreetmap/josm/command
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/Command.java

    r7005 r8285  
    6060    public static class OldNodeState {
    6161
    62         final LatLon latlon;
    63         final EastNorth eastNorth; // cached EastNorth to be used for applying exact displacement
    64         final boolean modified;
     62        private final LatLon latlon;
     63        private final EastNorth eastNorth; // cached EastNorth to be used for applying exact displacement
     64        private final boolean modified;
    6565
    6666        /**
     
    7272            eastNorth = node.getEastNorth();
    7373            modified = node.isModified();
     74        }
     75
     76        /**
     77         * Returns old lat/lon.
     78         * @return old lat/lon
     79         * @see Node#getCoor()
     80         */
     81        public final LatLon getLatlon() {
     82            return latlon;
     83        }
     84
     85        /**
     86         * Returns old east/north.
     87         * @return old east/north
     88         * @see Node#getEastNorth()
     89         */
     90        public final EastNorth getEastNorth() {
     91            return eastNorth;
     92        }
     93
     94        /**
     95         * Returns old modified state.
     96         * @return old modified state
     97         * @see Node #isModified()
     98         */
     99        public final boolean isModified() {
     100            return modified;
    74101        }
    75102    }
  • trunk/src/org/openstreetmap/josm/command/MoveCommand.java

    r7005 r8285  
    171171        for (Node n : nodes) {
    172172            OldNodeState os = it.next();
    173             if (os.eastNorth != null) {
    174                 n.setEastNorth(os.eastNorth.add(x, y));
     173            if (os.getEastNorth() != null) {
     174                n.setEastNorth(os.getEastNorth().add(x, y));
    175175            }
    176176        }
     
    197197        for (Node n : nodes) {
    198198            OldNodeState os = it.next();
    199             n.setCoor(os.latlon);
    200             n.setModified(os.modified);
     199            n.setCoor(os.getLatlon());
     200            n.setModified(os.isModified());
    201201        }
    202202    }
  • trunk/src/org/openstreetmap/josm/command/RotateCommand.java

    r6890 r8285  
    7676            double cosPhi = Math.cos(rotationAngle);
    7777            double sinPhi = Math.sin(rotationAngle);
    78             EastNorth oldEastNorth = oldStates.get(n).eastNorth;
     78            EastNorth oldEastNorth = oldStates.get(n).getEastNorth();
    7979            double x = oldEastNorth.east() - pivot.east();
    8080            double y = oldEastNorth.north() - pivot.north();
  • trunk/src/org/openstreetmap/josm/command/ScaleCommand.java

    r6890 r8285  
    2626    /**
    2727     * World position of the mouse when the user started the command.
    28      *
    2928     */
    30     EastNorth startEN = null;
     29    private EastNorth startEN = null;
    3130
    3231    /**
     
    6968    protected void transformNodes() {
    7069        for (Node n : nodes) {
    71             EastNorth oldEastNorth = oldStates.get(n).eastNorth;
     70            EastNorth oldEastNorth = oldStates.get(n).getEastNorth();
    7271            double dx = oldEastNorth.east() - pivot.east();
    7372            double dy = oldEastNorth.north() - pivot.north();
  • trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java

    r7005 r8285  
    9494        for (Node n : nodes) {
    9595            OldNodeState os = oldStates.get(n);
    96             n.setCoor(os.latlon);
    97             n.setModified(os.modified);
     96            n.setCoor(os.getLatlon());
     97            n.setModified(os.isModified());
    9898        }
    9999    }
Note: See TracChangeset for help on using the changeset viewer.