Ignore:
Timestamp:
2015-11-28T18:26:23+01:00 (4 years ago)
Author:
Don-vip
Message:

sonar - Immutable Field

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

Legend:

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

    r8308 r9067  
    1919 */
    2020public class ChangesetManagerToggleAction extends ToggleAction {
    21     private transient WindowListener changesetCacheManagerClosedHandler;
     21    private final transient WindowListener changesetCacheManagerClosedHandler;
    2222
    2323    /**
  • trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java

    r8919 r9067  
    463463        }
    464464
    465         private Set<NodePair> edges;
     465        private final Set<NodePair> edges;
    466466        private int numUndirectedEges;
    467467        private Map<Node, List<NodePair>> successors;
  • trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java

    r9062 r9067  
    102102     */
    103103    private static class PolarNode {
    104         private double a;
    105         private Node node;
     104        private final double a;
     105        private final Node node;
    106106
    107107        PolarNode(EastNorth center, Node n) {
  • trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java

    r8510 r9067  
    2828 */
    2929public class FullscreenToggleAction extends ToggleAction {
    30     private transient GraphicsDevice gd;
     30    private final transient GraphicsDevice gd;
    3131    private Rectangle prevBounds;
    3232
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r9062 r9067  
    190190
    191191        /** Set of {@link WayInPolygon} to be joined by walk algorithm */
    192         private Set<WayInPolygon> availableWays;
     192        private final Set<WayInPolygon> availableWays;
    193193        /** Current state of walk algorithm */
    194194        private WayInPolygon lastWay;
  • trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java

    r8510 r9067  
    181181
    182182        private final EastNorth refPoint;
    183         private EastNorth refPoint2;
     183        private final EastNorth refPoint2;
    184184        private final boolean projectToSegment;
    185185
  • trunk/src/org/openstreetmap/josm/actions/MoveAction.java

    r8510 r9067  
    2929    public enum Direction { UP, LEFT, RIGHT, DOWN }
    3030
    31     private Direction myDirection;
     31    private final Direction myDirection;
    3232
    3333    // any better idea?
  • trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java

    r8510 r9067  
    2828public class RenameLayerAction extends AbstractAction {
    2929
    30     private File file;
    31     private transient Layer layer;
     30    private final File file;
     31    private final transient Layer layer;
    3232
    3333    /**
  • trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java

    r8919 r9067  
    3232
    3333    public static class ReverseWayResult {
    34         private Way newWay;
    35         private Collection<Command> tagCorrectionCommands;
    36         private Command reverseCommand;
     34        private final Way newWay;
     35        private final Collection<Command> tagCorrectionCommands;
     36        private final Command reverseCommand;
    3737
    3838        public ReverseWayResult(Way newWay, Collection<Command> tagCorrectionCommands, Command reverseCommand) {
  • trunk/src/org/openstreetmap/josm/actions/ToggleUploadDiscouragedLayerAction.java

    r8308 r9067  
    1111public class ToggleUploadDiscouragedLayerAction extends JosmAction {
    1212
    13     private transient OsmDataLayer layer;
     13    private final transient OsmDataLayer layer;
    1414
    1515    public ToggleUploadDiscouragedLayerAction(OsmDataLayer layer) {
  • trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java

    r9062 r9067  
    259259        private boolean canceled;
    260260        private Exception lastException;
    261         private Collection<OsmPrimitive> toUpload;
    262         private OsmDataLayer layer;
     261        private final Collection<OsmPrimitive> toUpload;
     262        private final OsmDataLayer layer;
    263263        private OsmServerBackreferenceReader reader;
    264264
  • trunk/src/org/openstreetmap/josm/actions/ValidateAction.java

    r8855 r9067  
    112112    static class ValidationTask extends PleaseWaitRunnable {
    113113        private Collection<Test> tests;
    114         private Collection<OsmPrimitive> validatedPrimitives;
    115         private Collection<OsmPrimitive> formerValidatedPrimitives;
     114        private final Collection<OsmPrimitive> validatedPrimitives;
     115        private final Collection<OsmPrimitive> formerValidatedPrimitives;
    116116        private boolean canceled;
    117117        private List<TestError> errors;
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java

    r8908 r9067  
    1313 */
    1414public abstract class AbstractDownloadTask<T> implements DownloadTask {
    15     private List<Object> errorMessages;
     15    private final List<Object> errorMessages;
    1616    private boolean canceled;
    1717    private boolean failed;
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java

    r8908 r9067  
    9898
    9999    class DownloadTask extends PleaseWaitRunnable {
    100         private OsmServerReader reader;
     100        private final OsmServerReader reader;
    101101        private GpxData rawData;
    102102        private final boolean newLayer;
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java

    r8836 r9067  
    4444 */
    4545public class DownloadTaskList {
    46     private List<DownloadTask> tasks = new LinkedList<>();
    47     private List<Future<?>> taskFutures = new LinkedList<>();
     46    private final List<DownloadTask> tasks = new LinkedList<>();
     47    private final List<Future<?>> taskFutures = new LinkedList<>();
    4848    private ProgressMonitor progressMonitor;
    4949
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java

    r8510 r9067  
    2121
    2222public class PostDownloadHandler implements Runnable {
    23     private DownloadTask task;
    24     private List<Future<?>> futures;
     23    private final DownloadTask task;
     24    private final List<Future<?>> futures;
    2525
    2626    /**
  • trunk/src/org/openstreetmap/josm/actions/mapmode/AddNoteAction.java

    r9062 r9067  
    2727public class AddNoteAction extends MapMode implements KeyPressReleaseListener {
    2828
    29     private transient NoteData noteData;
     29    private final transient NoteData noteData;
    3030
    3131    /**
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r9062 r9067  
    14081408        private JCheckBoxMenuItem checkBox;
    14091409
    1410         private MouseListener anglePopupListener = new PopupMenuLauncher(new AnglePopupMenu()) {
     1410        private final MouseListener anglePopupListener = new PopupMenuLauncher(new AnglePopupMenu()) {
    14111411            @Override
    14121412            public void mouseClicked(MouseEvent e) {
  • trunk/src/org/openstreetmap/josm/actions/mapmode/PlayHeadDragMode.java

    r8840 r9067  
    2323    private Point mousePos;
    2424    private Point mouseStart;
    25     private transient PlayHeadMarker playHeadMarker;
     25    private final transient PlayHeadMarker playHeadMarker;
    2626
    2727    /**
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r9062 r9067  
    10201020    }
    10211021
    1022     private transient CycleManager cycleManager = new CycleManager();
    1023     private transient VirtualManager virtualManager = new VirtualManager();
     1022    private final transient CycleManager cycleManager = new CycleManager();
     1023    private final transient VirtualManager virtualManager = new VirtualManager();
    10241024
    10251025    private class CycleManager {
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r9021 r9067  
    6565public class SearchCompiler {
    6666
    67     private boolean caseSensitive;
    68     private boolean regexSearch;
     67    private final boolean caseSensitive;
     68    private final boolean regexSearch;
    6969    private static String  rxErrorMsg = marktr("The regex \"{0}\" had a parse error at offset {1}, full error:\n\n{2}");
    7070    private static String  rxErrorMsgNoPos = marktr("The regex \"{0}\" had a parse error, full error:\n\n{1}");
    71     private PushbackTokenizer tokenizer;
     71    private final PushbackTokenizer tokenizer;
    7272    private static Map<String, SimpleMatchFactory> simpleMatchFactoryMap = new HashMap<>();
    7373    private static Map<String, UnaryMatchFactory> unaryMatchFactoryMap = new HashMap<>();
     
    109109
    110110    public class CoreSimpleMatchFactory implements SimpleMatchFactory {
    111         private Collection<String> keywords = Arrays.asList("id", "version", "type", "user", "role",
     111        private final Collection<String> keywords = Arrays.asList("id", "version", "type", "user", "role",
    112112                "changeset", "nodes", "ways", "tags", "areasize", "waylength", "modified", "selected",
    113113                "incomplete", "untagged", "closed", "new", "indownloadedarea",
  • trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java

    r8512 r9067  
    3030     * List of checks to run on data
    3131     */
    32     private List<FixData> deprecated = new LinkedList<>();
     32    private final List<FixData> deprecated = new LinkedList<>();
    3333
    3434    /**
     
    107107    public static class FixDataKey implements FixData {
    108108        /** key of wrong data */
    109         private String oldKey;
     109        private final String oldKey;
    110110        /** key of correct data */
    111         private String newKey;
     111        private final String newKey;
    112112
    113113        /**
     
    141141    public static class FixDataTag implements FixData {
    142142        /** key of wrong data */
    143         private String oldKey;
     143        private final String oldKey;
    144144        /** value of wrong data */
    145         private String oldValue;
     145        private final String oldValue;
    146146        /** key of correct data */
    147         private String newKey;
     147        private final String newKey;
    148148        /** value of correct data */
    149         private String newValue;
     149        private final String newValue;
    150150
    151151        /**
  • trunk/src/org/openstreetmap/josm/actions/upload/UploadNotesTask.java

    r8840 r9067  
    4040
    4141        private boolean isCanceled;
    42         private Map<Note, Note> updatedNotes = new HashMap<>();
    43         private Map<Note, Exception> failedNotes = new HashMap<>();
     42        private final Map<Note, Note> updatedNotes = new HashMap<>();
     43        private final Map<Note, Exception> failedNotes = new HashMap<>();
    4444
    4545        /**
Note: See TracChangeset for help on using the changeset viewer.