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

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

Location:
trunk/src/org/openstreetmap/josm/data
Files:
21 edited

Legend:

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

    r7951 r8285  
    7272
    7373    private static class AutosaveLayerInfo {
    74         OsmDataLayer layer;
    75         String layerName;
    76         String layerFileName;
    77         final Deque<File> backupFiles = new LinkedList<>();
     74        private OsmDataLayer layer;
     75        private String layerName;
     76        private String layerFileName;
     77        private final Deque<File> backupFiles = new LinkedList<>();
    7878    }
    7979
  • trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java

    r7937 r8285  
    415415    public static class XMLCommandProcessor {
    416416
    417         Preferences mainPrefs;
    418         Map<String,Element> tasksMap = new HashMap<>();
     417        private Preferences mainPrefs;
     418        private Map<String,Element> tasksMap = new HashMap<>();
    419419
    420420        private boolean lastV; // last If condition result
    421421
    422 
    423         ScriptEngine engine ;
     422        private ScriptEngine engine;
    424423
    425424        public void openAndReadXML(File file) {
  • trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java

    r7937 r8285  
    5757
    5858    private static class CacheEntry {
    59         final double pixelPerDegree;
    60         final double east;
    61         final double north;
    62         final ProjectionBounds bounds;
    63         final String filename;
    64 
    65         long lastUsed;
    66         long lastModified;
     59        private final double pixelPerDegree;
     60        private final double east;
     61        private final double north;
     62        private final ProjectionBounds bounds;
     63        private final String filename;
     64
     65        private long lastUsed;
     66        private long lastModified;
    6767
    6868        CacheEntry(double pixelPerDegree, double east, double north, int tileSize, String filename) {
     
    8383
    8484    private static class ProjectionEntries {
    85         final String projection;
    86         final String cacheDirectory;
    87         final List<CacheEntry> entries = new ArrayList<>();
     85        private final String projection;
     86        private final String cacheDirectory;
     87        private final List<CacheEntry> entries = new ArrayList<>();
    8888
    8989        ProjectionEntries(String projection, String cacheDirectory) {
  • trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java

    r7005 r8285  
    7373
    7474    private static class FilterInfo {
    75         final Match match;
    76         final boolean isDelete;
    77         final boolean isInverted;
     75        private final Match match;
     76        private final boolean isDelete;
     77        private final boolean isInverted;
    7878
    7979        FilterInfo(Filter filter) throws ParseError {
  • trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java

    r8257 r8285  
    1818    }
    1919
    20     static final List<String> TRUE_VALUES = new ArrayList<>(Arrays
     20    private static final List<String> TRUE_VALUES = new ArrayList<>(Arrays
    2121            .asList(new String[] { "true", "yes", "1", "on" }));
    22     static final List<String> FALSE_VALUES = new ArrayList<>(Arrays
     22    private static final List<String> FALSE_VALUES = new ArrayList<>(Arrays
    2323            .asList(new String[] { "false", "no", "0", "off" }));
    24     static final List<String> REVERSE_VALUES = new ArrayList<>(Arrays
     24    private static final List<String> REVERSE_VALUES = new ArrayList<>(Arrays
    2525            .asList(new String[] { "reverse", "-1" }));
    2626
  • trunk/src/org/openstreetmap/josm/data/osm/PrimitiveDeepCopy.java

    r7961 r8285  
    5656
    5757        new AbstractVisitor() {
    58             boolean firstIteration;
     58            private boolean firstIteration;
    5959
    6060            @Override
  • trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java

    r7025 r8285  
    496496
    497497    class QuadBucketIterator implements Iterator<T> {
    498         QBLevel<T> current_node;
    499         int content_index;
    500         int iterated_over;
     498        private QBLevel<T> current_node;
     499        private int content_index;
     500        private int iterated_over;
    501501
    502502        final QBLevel<T> next_content_node(QBLevel<T> q) {
  • trunk/src/org/openstreetmap/josm/data/osm/Storage.java

    r7436 r8285  
    374374
    375375    private final class FMap<K> implements Map<K,T> {
    376         Hash<K,? super T> fHash;
     376        private Hash<K,? super T> fHash;
    377377
    378378        private FMap(Hash<K,? super T> h) {
     
    457457
    458458    private final class SafeReadonlyIter implements Iterator<T> {
    459         final T[] data;
    460         int slot = 0;
     459        private final T[] data;
     460        private int slot = 0;
    461461
    462462        SafeReadonlyIter(T[] data) {
     
    491491    private final class Iter implements Iterator<T> {
    492492        private final int mods;
    493         int slot = 0;
    494         int removeSlot = -1;
     493        private int slot = 0;
     494        private int removeSlot = -1;
    495495
    496496        Iter() {
  • trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java

    r7005 r8285  
    4545
    4646    private static class ListenerInfo {
    47         final DataSetListener listener;
    48         final boolean consolidate;
     47        private final DataSetListener listener;
     48        private final boolean consolidate;
    4949
    5050        public ListenerInfo(DataSetListener listener, boolean consolidate) {
  • trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java

    r7005 r8285  
    2727
    2828    private static class ListenerInfo {
    29         final SelectionChangedListener listener;
     29        private final SelectionChangedListener listener;
    3030
    3131        public ListenerInfo(SelectionChangedListener listener) {
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r8199 r8285  
    190190
    191191    private static class StyleRecord implements Comparable<StyleRecord> {
    192         final ElemStyle style;
    193         final OsmPrimitive osm;
    194         final int flags;
     192        private final ElemStyle style;
     193        private final OsmPrimitive osm;
     194        private final int flags;
    195195
    196196        public StyleRecord(ElemStyle style, OsmPrimitive osm, int flags) {
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShift.java

    r6890 r8285  
    4545    private double lonAccuracy;
    4646    private double latAccuracy;
    47     boolean latAccuracyAvailable;
    48     boolean lonAccuracyAvailable;
     47    private boolean latAccuracyAvailable;
     48    private boolean lonAccuracyAvailable;
    4949    private String subGridName;
    5050
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java

    r7082 r8285  
    5858    private float[] lonAccuracy;
    5959
    60     boolean bigEndian;
    6160    private NTV2SubGrid[] subGrid;
    6261
  • trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java

    r7937 r8285  
    3333    /** Is the error selected ? */
    3434    private boolean selected;
    35    
     35
    3636    private final Set<PaintedPoint> paintedPoints = new HashSet<>();
    3737    private final Set<PaintedSegment> paintedSegments = new HashSet<>();
     
    5555            this.color = color;
    5656        }
    57        
     57
    5858        @Override
    5959        public int hashCode() {
     
    6464            return result;
    6565        }
    66        
     66
    6767        @Override
    6868        public boolean equals(Object obj) {
     
    8383
    8484    protected static class PaintedSegment extends PaintedPoint {
    85         final LatLon p2;
    86        
     85        private final LatLon p2;
     86
    8787        public PaintedSegment(LatLon p1, LatLon p2, Color color) {
    8888            super(p1, color);
     
    133133    protected void drawNode(Node n, Color color) {
    134134        PaintedPoint pp = new PaintedPoint(n.getCoor(), color);
    135        
     135
    136136        if (!paintedPoints.contains(pp)) {
    137137            Point p = mv.getPoint(n);
    138138            g.setColor(color);
    139            
     139
    140140            if (selected) {
    141141                g.fillOval(p.x - 5, p.y - 5, 10, 10);
     
    156156    protected void drawSegment(Point p1, Point p2, Color color) {
    157157        g.setColor(color);
    158        
     158
    159159        double t = Math.atan2(p2.x - p1.x, p2.y - p1.y);
    160160        double cosT = 5 * Math.cos(t);
     
    272272        }
    273273    }
    274    
     274
    275275    /**
    276276     * Clears the internal painted objects collections.
  • trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java

    r7937 r8285  
    2626public class ConditionalKeys extends Test.TagTest {
    2727
    28     final OpeningHourTest openingHourTest = new OpeningHourTest();
    29     static final Set<String> RESTRICTION_TYPES = new HashSet<>(Arrays.asList("oneway", "toll", "noexit", "maxspeed", "minspeed", "maxstay",
     28    private final OpeningHourTest openingHourTest = new OpeningHourTest();
     29    private static final Set<String> RESTRICTION_TYPES = new HashSet<>(Arrays.asList("oneway", "toll", "noexit", "maxspeed", "minspeed", "maxstay",
    3030            "maxweight", "maxaxleload", "maxheight", "maxwidth", "maxlength", "overtaking", "maxgcweight", "maxgcweightrating", "fee"));
    31     static final Set<String> RESTRICTION_VALUES = new HashSet<>(Arrays.asList("yes", "official", "designated", "destination",
     31    private static final Set<String> RESTRICTION_VALUES = new HashSet<>(Arrays.asList("yes", "official", "designated", "destination",
    3232            "delivery", "permissive", "private", "agricultural", "forestry", "no"));
    33     static final Set<String> TRANSPORT_MODES = new HashSet<>(Arrays.asList("access", "foot", "ski", "inline_skates", "ice_skates",
     33    private static final Set<String> TRANSPORT_MODES = new HashSet<>(Arrays.asList("access", "foot", "ski", "inline_skates", "ice_skates",
    3434            "horse", "vehicle", "bicycle", "carriage", "trailer", "caravan", "motor_vehicle", "motorcycle", "moped", "mofa",
    3535            "motorcar", "motorhome", "psv", "bus", "taxi", "tourist_bus", "goods", "hgv", "agricultural", "atv", "snowmobile"
  • trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java

    r7937 r8285  
    5757    protected static final List<String> ISO_COUNTRIES = Arrays.asList(Locale.getISOCountries());
    5858
    59     boolean leftByPedestrians = false;
    60     boolean leftByCyclists = false;
    61     boolean leftByCars = false;
    62     int pedestrianWays = 0;
    63     int cyclistWays = 0;
    64     int carsWays = 0;
     59    private boolean leftByPedestrians = false;
     60    private boolean leftByCyclists = false;
     61    private boolean leftByCars = false;
     62    private int pedestrianWays = 0;
     63    private int cyclistWays = 0;
     64    private int carsWays = 0;
    6565
    6666    /**
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r8266 r8285  
    242242        }
    243243
    244         static final String POSSIBLE_THROWS = possibleThrows();
     244        private static final String POSSIBLE_THROWS = possibleThrows();
    245245
    246246        static final String possibleThrows() {
  • trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java

    r8242 r8285  
    7878    static enum CheckMode {
    7979        TIME_RANGE(0), POINTS_IN_TIME(1), BOTH(2);
    80         final int code;
     80        private final int code;
    8181
    8282        CheckMode(int code) {
     
    108108     */
    109109    public class OpeningHoursTestError {
    110         final Severity severity;
    111         final String message, prettifiedValue;
     110        private final Severity severity;
     111        private final String message;
     112        private final String prettifiedValue;
    112113
    113114        /**
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java

    r8126 r8285  
    130130    protected static final Entities entities = new Entities();
    131131
    132     static final List<String> DEFAULT_SOURCES = Arrays.asList(DATA_FILE, IGNORE_FILE, SPELL_FILE);
     132    private static final List<String> DEFAULT_SOURCES = Arrays.asList(DATA_FILE, IGNORE_FILE, SPELL_FILE);
    133133
    134134    /**
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java

    r7308 r8285  
    293293        private final double len;
    294294        private Set<Node> nearbyNodeCache;
    295         double nearbyNodeCacheDist = -1.0;
    296         final Node n1;
    297         final Node n2;
     295        private double nearbyNodeCacheDist = -1.0;
     296        private final Node n1;
     297        private final Node n2;
    298298
    299299        public MyWaySegment(Way w, Node n1, Node n2) {
  • trunk/src/org/openstreetmap/josm/data/validation/util/AggregatePrimitivesVisitor.java

    r7005 r8285  
    2121public class AggregatePrimitivesVisitor extends AbstractVisitor {
    2222    /** Aggregated data */
    23     final Collection<OsmPrimitive> aggregatedData = new HashSet<>();
     23    private final Collection<OsmPrimitive> aggregatedData = new HashSet<>();
    2424
    2525    /**
Note: See TracChangeset for help on using the changeset viewer.