Ignore:
Timestamp:
2015-12-02T00:05:09+01:00 (8 years ago)
Author:
Don-vip
Message:

sonar - Immutable Field

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java

    r8928 r9078  
    3636    private State state;
    3737    private URL playingUrl;
    38     private double leadIn; // seconds
    39     private double calibration; // ratio of purported duration of samples to true duration
     38    private final double leadIn; // seconds
     39    private final double calibration; // ratio of purported duration of samples to true duration
    4040    private double position; // seconds
    4141    private double bytesPerSecond;
     
    114114    }
    115115
    116     private Execute command;
     116    private final Execute command;
    117117
    118118    /**
  • trunk/src/org/openstreetmap/josm/tools/CompositeList.java

    r8510 r9078  
    1313 */
    1414public class CompositeList<T> extends AbstractList<T> {
    15     private List<? extends T> a, b;
     15    private final List<? extends T> a, b;
    1616
    1717    /**
  • trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java

    r8723 r9078  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.tools;
    3 
    4 import org.openstreetmap.josm.gui.layer.ImageProcessor;
    53
    64import java.awt.Dimension;
     
    86
    97import javax.swing.ImageIcon;
     8
     9import org.openstreetmap.josm.gui.layer.ImageProcessor;
    1010
    1111/** class to describe how image overlay
     
    1616    public ImageProvider image;
    1717    /** offset of the image from left border, values between 0 and 1 */
    18     private double offsetLeft;
     18    private final double offsetLeft;
    1919    /** offset of the image from top border, values between 0 and 1 */
    20     private double offsetRight;
     20    private final double offsetRight;
    2121    /** offset of the image from right border, values between 0 and 1*/
    22     private double offsetTop;
     22    private final double offsetTop;
    2323    /** offset of the image from bottom border, values between 0 and 1 */
    24     private double offsetBottom;
     24    private final double offsetBottom;
    2525
    2626    /**
  • trunk/src/org/openstreetmap/josm/tools/ImageResource.java

    r8840 r9078  
    2828     * Caches the image data for resized versions of the same image.
    2929     */
    30     private Map<Dimension, Image> imgCache = new HashMap<>();
     30    private final Map<Dimension, Image> imgCache = new HashMap<>();
    3131    /**
    3232     * SVG diagram information in case of SVG vector image.
  • trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java

    r8870 r9078  
    3232    private static final String STATUS_BAR_ID = "multikeyShortcut";
    3333
    34     private Map<MultikeyShortcutAction, MyAction> myActions = new HashMap<>();
     34    private final Map<MultikeyShortcutAction, MyAction> myActions = new HashMap<>();
    3535
    3636    private final class ShowLayersPopupWorker implements Runnable {
     
    188188    private long lastTimestamp;
    189189    private MyAction lastAction;
    190     private Timer timer;
     190    private final Timer timer;
    191191
    192192    private MultikeyActionsHandler() {
  • trunk/src/org/openstreetmap/josm/tools/TextTagParser.java

    r9073 r9078  
    4242        private boolean quotesStarted;
    4343        private boolean esc;
    44         private StringBuilder s = new StringBuilder(200);
     44        private final StringBuilder s = new StringBuilder(200);
    4545        private int pos;
    46         private String data;
    47         private int n;
     46        private final String data;
     47        private final int n;
    4848
    4949        public TextAnalyzer(String text) {
  • trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java

    r8856 r9078  
    6464
    6565    private class Parser extends DefaultHandler {
    66         private Stack<Object> current = new Stack<>();
     66        private final Stack<Object> current = new Stack<>();
    6767        private StringBuilder characters = new StringBuilder(64);
    6868
     
    182182
    183183    private static class Entry {
    184         private Class<?> klass;
    185         private boolean onStart;
    186         private boolean both;
     184        private final Class<?> klass;
     185        private final boolean onStart;
     186        private final boolean both;
    187187        private final Map<String, Field> fields = new HashMap<>();
    188188        private final Map<String, Method> methods = new HashMap<>();
     
    225225    }
    226226
    227     private Map<String, Entry> mapping = new HashMap<>();
    228     private DefaultHandler parser;
     227    private final Map<String, Entry> mapping = new HashMap<>();
     228    private final DefaultHandler parser;
    229229
    230230    /**
    231231     * The queue of already parsed items from the parsing thread.
    232232     */
    233     private List<Object> queue = new LinkedList<>();
     233    private final List<Object> queue = new LinkedList<>();
    234234    private Iterator<Object> queueIterator;
    235235
  • trunk/src/org/openstreetmap/josm/tools/date/FallbackDateParser.java

    r8836 r9078  
    3636    };
    3737
    38     private List<DateFormat> dateParsers;
     38    private final List<DateFormat> dateParsers;
    3939    private int activeDateParser;
    4040
  • trunk/src/org/openstreetmap/josm/tools/date/PrimaryDateParser.java

    r9062 r9078  
    2020public class PrimaryDateParser {
    2121    private DatatypeFactory datatypeFactory;
    22     private FallbackDateParser fallbackDateParser;
    23     private Calendar calendar;
     22    private final FallbackDateParser fallbackDateParser;
     23    private final Calendar calendar;
    2424
    2525    /**
  • trunk/src/org/openstreetmap/josm/tools/template_engine/Tokenizer.java

    r8846 r9078  
    5050    private int index;
    5151    private Token currentToken;
    52     private StringBuilder text = new StringBuilder();
     52    private final StringBuilder text = new StringBuilder();
    5353
    5454    public Tokenizer(String template) {
Note: See TracChangeset for help on using the changeset viewer.