Ignore:
Timestamp:
2016-09-03T12:37:39+02:00 (8 years ago)
Author:
Don-vip
Message:

sonar - squid:S1450 - Private fields only used as local variables in methods should become local variables

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

Legend:

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

    r10621 r10938  
    9494    private final Set<DataSet> changedDatasets = new HashSet<>();
    9595    private final List<AutosaveLayerInfo> layersInfo = new ArrayList<>();
    96     private Timer timer;
    9796    private final Object layersLock = new Object();
    9897    private final Deque<File> deletedLayers = new LinkedList<>();
     
    132131            }
    133132
    134             timer = new Timer(true);
    135             timer.schedule(this, 1000L, PROP_INTERVAL.get() * 1000L);
     133            new Timer(true).schedule(this, 1000L, PROP_INTERVAL.get() * 1000L);
    136134            Main.getLayerManager().addLayerChangeListener(this, true);
    137135        }
  • trunk/src/org/openstreetmap/josm/data/cache/BufferedImageCacheEntry.java

    r10723 r10938  
    1818    // transient to avoid serialization, volatile to avoid synchronization of whole getImage() method
    1919    private transient volatile BufferedImage img;
    20     private transient volatile boolean writtenToDisk;
    2120    // we need to have separate control variable, to know, if we already tried to load the image, as img might be null
    2221    // after we loaded image, as for example, when image file is malformed (eg. HTML file)
     
    7978            }
    8079            out.writeObject(this);
    81             // ugly hack to wait till element will get to disk to clean the memory
    82             writtenToDisk = true;
    8380
    8481            if (img != null) {
  • trunk/src/org/openstreetmap/josm/data/projection/proj/ObliqueMercator.java

    r10378 r10938  
    159159     * Constants used in the transformation.
    160160     */
    161     private double b, a, e;
    162 
    163     /**
    164      * Convenience value equal to {@link #a} / {@link #b}.
     161    private double b, e;
     162
     163    /**
     164     * Convenience value equal to {@code a} / {@link #b}.
    165165     */
    166166    private double arb;
    167167
    168168    /**
    169      * Convenience value equal to {@link #a}&times;{@link #b}.
     169     * Convenience value equal to {@code a}&times;{@link #b}.
    170170     */
    171171    private double ab;
    172172
    173173    /**
    174      * Convenience value equal to {@link #b} / {@link #a}.
     174     * Convenience value equal to {@link #b} / {@code a}.
    175175     */
    176176    private double bra;
     
    237237        double temp = cosph0 * cosph0;
    238238        b = Math.sqrt(1.0 + e2 * (temp * temp) / (1.0 - e2));
    239         a = b * com / con;
     239        double a = b * com / con;
    240240        final double d = b * com / (cosph0 * Math.sqrt(con));
    241241        double f = d * d - 1.0;
Note: See TracChangeset for help on using the changeset viewer.