Changeset 8308 in josm


Ignore:
Timestamp:
2015-05-02T00:55:19+02:00 (10 years ago)
Author:
Don-vip
Message:

fix potential NPEs and Sonar issues related to serialization

Location:
trunk/src/org/openstreetmap/josm
Files:
223 edited

Legend:

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

    r7693 r8308  
    1111import java.net.MalformedURLException;
    1212
    13 import javax.swing.Action;
    1413import javax.swing.JComboBox;
    1514import javax.swing.JOptionPane;
     
    3635 */
    3736public class AddImageryLayerAction extends JosmAction implements AdaptableAction {
    38     private final ImageryInfo info;
     37    private final transient ImageryInfo info;
    3938
    4039    /**
  • trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java

    r8200 r8308  
    5555    private final String mode;
    5656
    57     protected ZoomChangeAdapter zoomChangeAdapter;
    58     protected MapFrameAdapter mapFrameAdapter;
     57    protected transient ZoomChangeAdapter zoomChangeAdapter;
     58    protected transient MapFrameAdapter mapFrameAdapter;
    5959    /** Time of last zoom to bounds action */
    6060    protected long lastZoomTime = -1;
  • trunk/src/org/openstreetmap/josm/actions/ChangesetManagerToggleAction.java

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

    r8303 r8308  
    77import java.awt.event.ActionEvent;
    88import java.awt.event.KeyEvent;
     9import java.io.Serializable;
    910import java.util.ArrayList;
    1011import java.util.Arrays;
     
    113114     * Comparator used to order PolarNode relative to their angle.
    114115     */
    115     private static class PolarNodeComparator implements Comparator<PolarNode> {
    116 
     116    private static class PolarNodeComparator implements Comparator<PolarNode>, Serializable {
     117        private static final long serialVersionUID = 1L;
    117118        @Override
    118119        public int compare(PolarNode pc1, PolarNode pc2) {
  • trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java

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

    r8152 r8308  
    4646    private double oldDx, oldDy;
    4747    private EastNorth prevEastNorth;
    48     private ImageryLayer layer;
     48    private transient ImageryLayer layer;
    4949    private MapMode oldMapMode;
    5050
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r7989 r8308  
    5555    private final LinkedList<Command> cmds = new LinkedList<>();
    5656    private int cmdsCount = 0;
    57     private final List<Relation> addedRelations = new LinkedList<>();
     57    private final transient List<Relation> addedRelations = new LinkedList<>();
    5858
    5959    /**
  • trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java

    r7859 r8308  
    77import java.awt.event.ActionEvent;
    88import java.awt.event.KeyEvent;
     9import java.io.Serializable;
    910import java.util.Collection;
    1011import java.util.Collections;
     
    171172     * Sorts collinear nodes by their distance to a common reference node.
    172173     */
    173     private static class NodeDistanceToRefNodeComparator implements Comparator<Node> {
     174    private static class NodeDistanceToRefNodeComparator implements Comparator<Node>, Serializable {
     175
     176        private static final long serialVersionUID = 1L;
     177
    174178        private final EastNorth refPoint;
    175179        private EastNorth refPoint2;
  • trunk/src/org/openstreetmap/josm/actions/JosmAction.java

    r7859 r8308  
    4040public abstract class JosmAction extends AbstractAction implements Destroyable {
    4141
    42     protected Shortcut sc;
    43     private LayerChangeAdapter layerChangeAdapter;
    44     private SelectionChangeAdapter selectionChangeAdapter;
     42    protected transient Shortcut sc;
     43    private transient LayerChangeAdapter layerChangeAdapter;
     44    private transient SelectionChangeAdapter selectionChangeAdapter;
    4545
    4646    /**
  • trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java

    r8068 r8308  
    7070     * List of available rectifier services.
    7171     */
    72     private final List<RectifierService> services = new ArrayList<>();
     72    private final transient List<RectifierService> services = new ArrayList<>();
    7373
    7474    /**
  • trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java

    r8202 r8308  
    118118                        }
    119119                    });
    120                     if (matchingFiles.length == 1) {
     120                    if (matchingFiles != null && matchingFiles.length == 1) {
    121121                        // use the unique match as filename
    122122                        this.files.add(matchingFiles[0]);
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r8240 r8308  
    5252public class OpenLocationAction extends JosmAction {
    5353
    54     protected final List<Class<? extends DownloadTask>> downloadTasks;
     54    protected final transient List<Class<? extends DownloadTask>> downloadTasks;
    5555
    5656    /**
  • trunk/src/org/openstreetmap/josm/actions/PurgeAction.java

    r8285 r8308  
    6969    }
    7070
    71     protected OsmDataLayer layer;
     71    protected transient OsmDataLayer layer;
    7272    protected JCheckBox cbClearUndoRedo;
    7373
    74     protected Set<OsmPrimitive> toPurge;
     74    protected transient Set<OsmPrimitive> toPurge;
    7575    /**
    7676     * finally, contains all objects that are purged
    7777     */
    78     protected Set<OsmPrimitive> toPurgeChecked;
     78    protected transient Set<OsmPrimitive> toPurgeChecked;
    7979    /**
    8080     * Subset of toPurgeChecked. Marks primitives that remain in the
    8181     * dataset, but incomplete.
    8282     */
    83     protected Set<OsmPrimitive> makeIncomplete;
     83    protected transient Set<OsmPrimitive> makeIncomplete;
    8484    /**
    8585     * Subset of toPurgeChecked. Those that have not been in the selection.
    8686     */
    87     protected List<OsmPrimitive> toPurgeAdditionally;
     87    protected transient List<OsmPrimitive> toPurgeAdditionally;
    8888
    8989    @Override
  • trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java

    r7026 r8308  
    22package org.openstreetmap.josm.actions;
    33
     4import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    45import static org.openstreetmap.josm.tools.I18n.tr;
    5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    66
    77import java.awt.Dialog.ModalityType;
     
    1717import org.openstreetmap.josm.Main;
    1818import org.openstreetmap.josm.gui.layer.Layer;
     19import org.openstreetmap.josm.gui.widgets.JosmTextField;
    1920import org.openstreetmap.josm.tools.ImageProvider;
    20 import org.openstreetmap.josm.gui.widgets.JosmTextField;
    2121
    2222/**
     
    2929
    3030    private File file;
    31     private Layer layer;
     31    private transient Layer layer;
    3232
    3333    /**
  • trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java

    r7578 r8308  
    4949public class SessionSaveAsAction extends DiskAccessAction {
    5050
    51     private List<Layer> layers;
    52     private Map<Layer, SessionLayerExporter> exporters;
    53     private MultiMap<Layer, Layer> dependencies;
     51    private transient List<Layer> layers;
     52    private transient Map<Layer, SessionLayerExporter> exporters;
     53    private transient MultiMap<Layer, Layer> dependencies;
    5454
    5555    /**
  • trunk/src/org/openstreetmap/josm/actions/ToggleAction.java

    r7937 r8308  
    2323public abstract class ToggleAction extends JosmAction {
    2424
    25     private final List<ButtonModel> buttonModels = new ArrayList<>();
     25    private final transient List<ButtonModel> buttonModels = new ArrayList<>();
    2626
    2727    /**
  • trunk/src/org/openstreetmap/josm/actions/ToggleUploadDiscouragedLayerAction.java

    r7937 r8308  
    1111public class ToggleUploadDiscouragedLayerAction extends JosmAction {
    1212
    13     private OsmDataLayer layer;
    14    
     13    private transient OsmDataLayer layer;
     14
    1515    public ToggleUploadDiscouragedLayerAction(OsmDataLayer layer) {
    1616        super(tr("Encourage/discourage upload"), null, null, null, false);
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r7152 r8308  
    4747public class UnGlueAction extends JosmAction {
    4848
    49     private Node selectedNode;
    50     private Way selectedWay;
    51     private Set<Node> selectedNodes;
     49    private transient Node selectedNode;
     50    private transient Way selectedWay;
     51    private transient Set<Node> selectedNodes;
    5252
    5353    /**
  • trunk/src/org/openstreetmap/josm/actions/ValidateAction.java

    r7117 r8308  
    3535
    3636    /** Last selection used to validate */
    37     private Collection<OsmPrimitive> lastSelection;
     37    private transient Collection<OsmPrimitive> lastSelection;
    3838
    3939    /**
  • trunk/src/org/openstreetmap/josm/actions/mapmode/AddNoteAction.java

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

    r8291 r8308  
    5656     * set would have to be checked.
    5757     */
    58     private WaySegment oldHighlightedWaySegment = null;
     58    private transient WaySegment oldHighlightedWaySegment = null;
    5959
    6060    private static final HighlightHelper highlightHelper = new HighlightHelper();
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r8285 r8308  
    7676    private final Cursor cursorJoinWay;
    7777
    78     private Node lastUsedNode = null;
     78    private transient Node lastUsedNode = null;
    7979    private static final double PHI = Math.toRadians(90);
    8080    private double toleranceMultiplier;
    8181
    82     private Node mouseOnExistingNode;
    83     private Set<Way> mouseOnExistingWays = new HashSet<>();
     82    private transient Node mouseOnExistingNode;
     83    private transient Set<Way> mouseOnExistingWays = new HashSet<>();
    8484    // old highlights store which primitives are currently highlighted. This
    8585    // is true, even if target highlighting is disabled since the status bar
    8686    // derives its information from this list as well.
    87     private Set<OsmPrimitive> oldHighlights = new HashSet<>();
     87    private transient Set<OsmPrimitive> oldHighlights = new HashSet<>();
    8888    // new highlights contains a list of primitives that should be highlighted
    8989    // but haven’t been so far. The idea is to compare old and new and only
    9090    // repaint if there are changes.
    91     private Set<OsmPrimitive> newHighlights = new HashSet<>();
     91    private transient Set<OsmPrimitive> newHighlights = new HashSet<>();
    9292    private boolean drawHelperLine;
    9393    private boolean wayIsFinished = false;
     
    9797    private Color rubberLineColor;
    9898
    99     private Node currentBaseNode;
    100     private Node previousNode;
     99    private transient Node currentBaseNode;
     100    private transient Node previousNode;
    101101    private EastNorth currentMouseEastNorth;
    102102
    103     private final SnapHelper snapHelper = new SnapHelper();
    104 
    105     private final Shortcut backspaceShortcut;
     103    private final transient SnapHelper snapHelper = new SnapHelper();
     104
     105    private final transient Shortcut backspaceShortcut;
    106106    private final BackSpaceAction backspaceAction;
    107     private final Shortcut snappingShortcut;
     107    private final transient Shortcut snappingShortcut;
    108108    private boolean ignoreNextKeyRelease;
    109109
     
    111111    private final JCheckBoxMenuItem snapCheckboxMenuItem;
    112112    private boolean useRepeatedShortcut;
    113     private Stroke rubberLineStroke;
     113    private transient Stroke rubberLineStroke;
    114114    private static final BasicStroke BASIC_STROKE = new BasicStroke(1);
    115115
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r7668 r8308  
    2525import java.util.LinkedList;
    2626import java.util.List;
     27
    2728import javax.swing.JCheckBoxMenuItem;
    2829import javax.swing.JMenuItem;
     
    4950import org.openstreetmap.josm.gui.layer.MapViewPaintable;
    5051import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     52import org.openstreetmap.josm.gui.util.GuiHelper;
    5153import org.openstreetmap.josm.gui.util.KeyPressReleaseListener;
    52 import org.openstreetmap.josm.gui.util.GuiHelper;
    5354import org.openstreetmap.josm.gui.util.ModifierListener;
    5455import org.openstreetmap.josm.tools.Geometry;
     
    7273
    7374    private long mouseDownTime = 0;
    74     private WaySegment selectedSegment = null;
    75     private Node selectedNode = null;
     75    private transient WaySegment selectedSegment = null;
     76    private transient Node selectedNode = null;
    7677    private Color mainColor;
    77     private Stroke mainStroke;
     78    private transient Stroke mainStroke;
    7879
    7980    /** settings value whether shared nodes should be ignored or not */
     
    8687     */
    8788    private Color helperColor;
    88     private Stroke helperStrokeDash;
    89     private Stroke helperStrokeRA;
    90 
    91     private Stroke oldLineStroke;
     89    private transient Stroke helperStrokeDash;
     90    private transient Stroke helperStrokeRA;
     91
     92    private transient Stroke oldLineStroke;
    9293    private double symbolSize;
    9394    /**
    9495     * Possible directions to move to.
    9596     */
    96     private List<ReferenceSegment> possibleMoveDirections;
     97    private transient List<ReferenceSegment> possibleMoveDirections;
    9798
    9899
     
    105106     * The direction that is currently active.
    106107     */
    107     private ReferenceSegment activeMoveDirection;
     108    private transient ReferenceSegment activeMoveDirection;
    108109
    109110    /**
     
    135136     * the command that performed last move.
    136137     */
    137     private MoveCommand moveCommand;
     138    private transient MoveCommand moveCommand;
    138139    /**
    139140     *  The command used for dual alignment movement.
    140141     *  Needs to be separate, due to two nodes moving in different directions.
    141142     */
    142     private MoveCommand moveCommand2;
     143    private transient MoveCommand moveCommand2;
    143144
    144145    /** The cursor for the 'create_new' mode. */
     
    176177    private boolean dualAlignActive;
    177178    /** Dual alignment reference segments */
    178     private ReferenceSegment dualAlignSegment1, dualAlignSegment2;
     179    private transient ReferenceSegment dualAlignSegment1, dualAlignSegment2;
    179180    /** {@code true}, if new segment was collapsed */
    180181    private boolean dualAlignSegmentCollapsed = false;
     
    182183    private final DualAlignChangeAction dualAlignChangeAction;
    183184    private final JCheckBoxMenuItem dualAlignCheckboxMenuItem;
    184     private final Shortcut dualAlignShortcut;
     185    private final transient Shortcut dualAlignShortcut;
    185186    private boolean useRepeatedShortcut;
    186187    private boolean ignoreNextKeyRelease;
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java

    r8061 r8308  
    6464    private static final long serialVersionUID = 42L;
    6565
    66     private Way targetWay;
    67     private Node candidateNode = null;
    68     private WaySegment candidateSegment = null;
     66    private transient Way targetWay;
     67    private transient Node candidateNode = null;
     68    private transient WaySegment candidateSegment = null;
    6969
    7070    private Point mousePos = null;
     
    8080
    8181    private Color guideColor;
    82     private Stroke selectTargetWayStroke;
    83     private Stroke moveNodeStroke;
    84     private Stroke addNodeStroke;
    85     private Stroke deleteNodeStroke;
     82    private transient Stroke selectTargetWayStroke;
     83    private transient Stroke moveNodeStroke;
     84    private transient Stroke addNodeStroke;
     85    private transient Stroke deleteNodeStroke;
    8686    private int dotSize;
    8787
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java

    r8285 r8308  
    102102    private double snapDistanceNautical;
    103103
    104     private ModifiersSpec snapModifierCombo;
    105     private ModifiersSpec copyTagsModifierCombo;
    106     private ModifiersSpec addToSelectionModifierCombo;
    107     private ModifiersSpec toggleSelectedModifierCombo;
    108     private ModifiersSpec setSelectedModifierCombo;
     104    private transient ModifiersSpec snapModifierCombo;
     105    private transient ModifiersSpec copyTagsModifierCombo;
     106    private transient ModifiersSpec addToSelectionModifierCombo;
     107    private transient ModifiersSpec toggleSelectedModifierCombo;
     108    private transient ModifiersSpec setSelectedModifierCombo;
    109109
    110110    private int initialMoveDelay;
     
    118118    private boolean mouseHasBeenDragged;
    119119
    120     private WaySegment referenceSegment;
    121     private ParallelWays pWays;
    122     private Set<Way> sourceWays;
     120    private transient WaySegment referenceSegment;
     121    private transient ParallelWays pWays;
     122    private transient Set<Way> sourceWays;
    123123    private EastNorth helperLineStart;
    124124    private EastNorth helperLineEnd;
    125125
    126     private Stroke helpLineStroke;
    127     private Stroke refLineStroke;
     126    private transient Stroke helpLineStroke;
     127    private transient Stroke refLineStroke;
    128128    private Color mainColor;
    129129
  • trunk/src/org/openstreetmap/josm/actions/mapmode/PlayHeadDragMode.java

    r6380 r8308  
    2323    private Point mousePos = null;
    2424    private Point mouseStart = null;
    25     private PlayHeadMarker playHeadMarker = null;
     25    private transient PlayHeadMarker playHeadMarker = null;
    2626
    2727    /**
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r8285 r8308  
    122122
    123123    private Mode mode = null;
    124     private final SelectionManager selectionManager;
     124    private final transient SelectionManager selectionManager;
    125125    private boolean cancelDrawMode = false;
    126126    private boolean drawTargetHighlight;
     
    171171     * set would have to be checked.
    172172     */
    173     private Set<OsmPrimitive> oldHighlights = new HashSet<>();
     173    private transient Set<OsmPrimitive> oldHighlights = new HashSet<>();
    174174
    175175    /**
     
    947947    }
    948948
    949     private CycleManager cycleManager = new CycleManager();
    950     private VirtualManager virtualManager = new VirtualManager();
     949    private transient CycleManager cycleManager = new CycleManager();
     950    private transient VirtualManager virtualManager = new VirtualManager();
    951951
    952952    private class CycleManager {
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ZoomAction.java

    r6380 r8308  
    3232
    3333    /**
    34      * Manager that manages the selection rectangle with the aspect ratio of the
    35      * MapView.
     34     * Manager that manages the selection rectangle with the aspect ratio of the MapView.
    3635     */
    37     private final SelectionManager selectionManager;
     36    private final transient SelectionManager selectionManager;
    3837
    3938    /**
  • trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java

    r7937 r8308  
    1313
    1414/**
    15  * Ancestor for all actions that want to work with relation collection and 
     15 * Ancestor for all actions that want to work with relation collection and
    1616 * to be disabled if the collection is empty
    1717 * @since 5793
    1818 */
    1919public abstract class AbstractRelationAction extends AbstractAction implements OsmPrimitiveAction {
    20     protected Collection<Relation> relations = Collections.<Relation>emptySet();
     20    protected transient Collection<Relation> relations = Collections.<Relation>emptySet();
    2121
    2222    protected static final Collection<Relation> getRelations(Collection<? extends OsmPrimitive> primitives) {
     
    2828        }
    2929    }
    30    
     30
    3131    @Override
    3232    public void setPrimitives(Collection<? extends OsmPrimitive> primitives) {
     
    3434        updateEnabledState();
    3535    }
    36    
     36
    3737    protected void updateEnabledState() {
    3838        setEnabled(!relations.isEmpty());
  • trunk/src/org/openstreetmap/josm/actions/relation/DownloadSelectedIncompleteMembersAction.java

    r7946 r8308  
    2424public class DownloadSelectedIncompleteMembersAction extends AbstractRelationAction {
    2525
    26     private Collection<OsmPrimitive> incompleteMembers;
     26    private transient Collection<OsmPrimitive> incompleteMembers;
    2727
    2828    /**
  • trunk/src/org/openstreetmap/josm/corrector/CorrectionTableModel.java

    r6883 r8308  
    1111public abstract class CorrectionTableModel<C extends Correction> extends AbstractTableModel {
    1212
    13     private List<C> corrections;
     13    private transient List<C> corrections;
    1414    private boolean[] apply;
    1515    private int applyColumn;
  • trunk/src/org/openstreetmap/josm/data/AutosaveTask.java

    r8285 r8308  
    100100            }
    101101
    102             for (File f: deletedLayersDir.listFiles()) {
    103                 deletedLayers.add(f); // FIXME: sort by mtime
     102            File[] files = deletedLayersDir.listFiles();
     103            if (files != null) {
     104                for (File f: files) {
     105                    deletedLayers.add(f); // FIXME: sort by mtime
     106                }
    104107            }
    105108
  • trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java

    r8285 r8308  
    303303    public static void deleteFileOrDirectory(File f) {
    304304        if (f.isDirectory()) {
    305             for (File f1: f.listFiles()) {
    306                 deleteFileOrDirectory(f1);
     305            File[] files = f.listFiles();
     306            if (files != null) {
     307                for (File f1: files) {
     308                    deleteFileOrDirectory(f1);
     309                }
    307310            }
    308311        }
     
    310313            f.delete();
    311314        } catch (Exception e) {
    312             log("Warning: Can not delete file "+f.getPath());
     315            log("Warning: Can not delete file "+f.getPath()+": "+e.getMessage());
    313316        }
    314317    }
  • trunk/src/org/openstreetmap/josm/data/cache/CacheEntryAttributes.java

    r8168 r8308  
    99/**
    1010 * Class that contains attirubtes for JCS cache entries. Parameters are used to properly handle HTTP caching
    11  * 
     11 *
    1212 * @author Wiktor Niesiobędzki
    1313 *
     
    1515public class CacheEntryAttributes extends ElementAttributes {
    1616    private static final long serialVersionUID = 1L; //version
    17     private Map<String, String> attrs = new HashMap<String, String>();
     17    private transient Map<String, String> attrs = new HashMap<String, String>();
    1818    private final static String NO_TILE_AT_ZOOM = "noTileAtZoom";
    1919    private final static String ETAG = "Etag";
  • trunk/src/org/openstreetmap/josm/data/coor/CachedLatLon.java

    r6380 r8308  
    1616public class CachedLatLon extends LatLon {
    1717    private EastNorth eastNorth;
    18     private Projection proj;
     18    private transient Projection proj;
    1919
    2020    public CachedLatLon(double lat, double lon) {
  • trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java

    r7509 r8308  
    1010 */
    1111public class EastNorth extends Coordinate {
     12
     13    private static final long serialVersionUID = 1L;
    1214
    1315    public EastNorth(double east, double north) {
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r7236 r8308  
    3838public class LatLon extends Coordinate {
    3939
     40    private static final long serialVersionUID = 1L;
     41
    4042    /**
    4143     * Minimum difference in location to not be represented as the same position.
  • trunk/src/org/openstreetmap/josm/data/gpx/Extensions.java

    r7937 r8308  
    1010public class Extensions extends LinkedHashMap<String, String> {
    1111
     12    private static final long serialVersionUID = 1L;
     13
    1214    public Extensions(Map<? extends String, ? extends String> m) {
    1315        super(m);
  • trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java

    r8285 r8308  
    227227                }
    228228
    229                 for (File file: projectionDir.listFiles()) {
    230                     if (!referencedFiles.contains(file.getName())) {
    231                         file.delete();
     229                File[] files = projectionDir.listFiles();
     230                if (files != null) {
     231                    for (File file: files) {
     232                        if (!referencedFiles.contains(file.getName())) {
     233                            file.delete();
     234                        }
    232235                    }
    233236                }
     
    235238        }
    236239
    237         for (File projectionDir: cacheDir.listFiles()) {
    238             if (projectionDir.isDirectory() && !usedProjections.contains(projectionDir.getName())) {
    239                 Utils.deleteDirectory(projectionDir);
     240        File[] files = cacheDir.listFiles();
     241        if (files != null) {
     242            for (File projectionDir: files) {
     243                if (projectionDir.isDirectory() && !usedProjections.contains(projectionDir.getName())) {
     244                    Utils.deleteDirectory(projectionDir);
     245                }
    240246            }
    241247        }
  • trunk/src/org/openstreetmap/josm/data/osm/NodePositionComparator.java

    r3650 r8308  
    22package org.openstreetmap.josm.data.osm;
    33
     4import java.io.Serializable;
    45import java.util.Comparator;
    56
     
    910 * @author viesturs
    1011 */
    11 public class NodePositionComparator implements Comparator<Node> {
     12public class NodePositionComparator implements Comparator<Node>, Serializable {
     13
     14    private static final long serialVersionUID = 1L;
     15
    1216    @Override
    1317    public int compare(Node n1, Node n2) {
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveComparator.java

    r7937 r8308  
    22package org.openstreetmap.josm.data.osm;
    33
     4import java.io.Serializable;
    45import java.util.Comparator;
    56import java.util.HashMap;
     
    1516 * @since 4113
    1617 */
    17 public class OsmPrimitiveComparator implements Comparator<OsmPrimitive> {
     18public class OsmPrimitiveComparator implements Comparator<OsmPrimitive>, Serializable {
     19
     20    private static final long serialVersionUID = 1L;
     21
    1822    private final Map<OsmPrimitive, String> cache = new HashMap<>();
    1923    private final boolean relationsFirst;
  • trunk/src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java

    r8194 r8308  
    99
    1010public class SimplePrimitiveId implements PrimitiveId, Serializable {
     11
     12    private static final long serialVersionUID = 1L;
     13
    1114    private final long id;
    1215    private final OsmPrimitiveType type;
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShift.java

    r8285 r8308  
    3737public class NTV2GridShift implements Serializable {
    3838
     39    private static final long serialVersionUID = 1L;
     40
    3941    private static final double METRE_PER_SECOND = 2.0 * Math.PI * 6378137.0 / 3600.0 / 360.0;
    4042    private static final double RADIANS_PER_SECOND = 2.0 * Math.PI / 3600.0 / 360.0;
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java

    r7951 r8308  
    6363public class NTV2GridShiftFile implements Serializable {
    6464
     65    private static final long serialVersionUID = 1L;
     66
    6567    private int overviewHeaderCount;
    6668    private int subGridHeaderCount;
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java

    r8285 r8308  
    3838 */
    3939public class NTV2SubGrid implements Cloneable, Serializable {
     40
     41    private static final long serialVersionUID = 1L;
    4042
    4143    private String subGridName;
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r7864 r8308  
    7777    private boolean toggleable = false;
    7878    private String rememberSizePref = "";
    79     private WindowGeometry defaultWindowGeometry = null;
     79    private transient WindowGeometry defaultWindowGeometry = null;
    8080    private String togglePref = "";
    8181    private int toggleValue = -1;
     
    8585    private final String[] bTexts;
    8686    private String[] bToolTipTexts;
    87     private Icon[] bIcons;
    88     private List<Integer> cancelButtonIdx = Collections.emptyList();
     87    private transient Icon[] bIcons;
     88    private transient List<Integer> cancelButtonIdx = Collections.emptyList();
    8989    private int defaultButtonIdx = 1;
    9090    protected JButton defaultButton = null;
    91     private Icon icon;
     91    private transient Icon icon;
    9292    private boolean modal;
    9393    private boolean focusOnDefaultButton = false;
     
    105105
    106106    // For easy access when inherited
    107     protected Insets contentInsets = new Insets(10,5,0,5);
    108     protected List<JButton> buttons = new ArrayList<>();
     107    protected transient Insets contentInsets = new Insets(10,5,0,5);
     108    protected transient List<JButton> buttons = new ArrayList<>();
    109109
    110110    /**
  • trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java

    r7694 r8308  
    2525
    2626    public boolean groupbutton;
    27     private ShowHideButtonListener listener;
     27    private transient ShowHideButtonListener listener;
    2828    private boolean hideIfDisabled = false;
    2929    private boolean isExpert;
  • trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java

    r8286 r8308  
    5858    };
    5959
    60     private Action offsetAction = new JosmAction(
     60    private transient Action offsetAction = new JosmAction(
    6161            tr("Imagery offset"), "mapmode/adjustimg", tr("Adjust imagery offset"), null, false, false) {
    6262        {
     
    256256     * @since 5803
    257257     */
    258     private List <Object> dynamicItems = new ArrayList<>(20);
     258    private transient List <Object> dynamicItems = new ArrayList<>(20);
    259259
    260260    /**
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r8212 r8308  
    232232    public final HistoryInfoWebAction historyinfoweb = new HistoryInfoWebAction();
    233233    /** View / "Zoom to"... actions */
    234     public final Map<String, AutoScaleAction> autoScaleActions = new HashMap<>();
     234    public final transient Map<String, AutoScaleAction> autoScaleActions = new HashMap<>();
    235235    /** View / Jump to position */
    236236    public final JumpToAction jumpToAct = new JumpToAction();
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r8285 r8308  
    103103     * This object allows to detect key press and release events
    104104     */
    105     public final AdvancedKeyPressDetector keyDetector = new AdvancedKeyPressDetector();
     105    public final transient AdvancedKeyPressDetector keyDetector = new AdvancedKeyPressDetector();
    106106
    107107    /**
     
    114114    private final JToolBar toolBarToggle = new JToolBar(JToolBar.VERTICAL);
    115115
    116     private final List<ToggleDialog> allDialogs = new ArrayList<>();
    117     private final List<MapMode> mapModes = new ArrayList<>();
    118     private final List<IconToggleButton> allDialogButtons = new ArrayList<>();
    119     public final List<IconToggleButton> allMapModeButtons = new ArrayList<>();
     116    private final transient List<ToggleDialog> allDialogs = new ArrayList<>();
     117    private final transient List<MapMode> mapModes = new ArrayList<>();
     118    private final transient List<IconToggleButton> allDialogButtons = new ArrayList<>();
     119    public final transient List<IconToggleButton> allMapModeButtons = new ArrayList<>();
    120120
    121121    private final ListAllButtonsAction listAllDialogsAction = new ListAllButtonsAction(allDialogButtons);
     
    141141    public LassoModeAction mapModeSelectLasso;
    142142
    143     private final Map<Layer, MapMode> lastMapMode = new HashMap<>();
     143    private final transient Map<Layer, MapMode> lastMapMode = new HashMap<>();
    144144    private final MapMode mapModeDraw;
    145145    private final MapMode mapModeZoom;
     
    538538
    539539        private JButton button;
    540         private Collection<? extends HideableButton> buttons;
     540        private transient Collection<? extends HideableButton> buttons;
    541541
    542542
     
    670670    private static final CopyOnWriteArrayList<MapModeChangeListener> mapModeChangeListeners = new CopyOnWriteArrayList<>();
    671671
    672     private PreferenceChangedListener sidetoolbarPreferencesChangedListener;
     672    private transient PreferenceChangedListener sidetoolbarPreferencesChangedListener;
    673673    /**
    674674     * Adds a mapMode change listener
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r8285 r8308  
    121121     */
    122122    private final MapView mv;
    123     private final Collector collector;
     123    private final transient Collector collector;
    124124
    125125    public class BackgroundProgressMonitor implements ProgressMonitorDialog {
     
    175175    }
    176176
    177     private final ImageLabel latText = new ImageLabel("lat", tr("The geographic latitude at the mouse pointer."), 11, PROP_BACKGROUND_COLOR.get());
    178     private final ImageLabel lonText = new ImageLabel("lon", tr("The geographic longitude at the mouse pointer."), 11, PROP_BACKGROUND_COLOR.get());
    179     private final ImageLabel headingText = new ImageLabel("heading", tr("The (compass) heading of the line segment being drawn."), 6, PROP_BACKGROUND_COLOR.get());
    180     private final ImageLabel angleText = new ImageLabel("angle", tr("The angle between the previous and the current way segment."), 6, PROP_BACKGROUND_COLOR.get());
    181     private final ImageLabel distText = new ImageLabel("dist", tr("The length of the new way segment being drawn."), 10, PROP_BACKGROUND_COLOR.get());
    182     private final ImageLabel nameText = new ImageLabel("name", tr("The name of the object at the mouse pointer."), 20, PROP_BACKGROUND_COLOR.get());
     177    private final ImageLabel latText = new ImageLabel("lat",
     178            tr("The geographic latitude at the mouse pointer."), 11, PROP_BACKGROUND_COLOR.get());
     179    private final ImageLabel lonText = new ImageLabel("lon",
     180            tr("The geographic longitude at the mouse pointer."), 11, PROP_BACKGROUND_COLOR.get());
     181    private final ImageLabel headingText = new ImageLabel("heading",
     182            tr("The (compass) heading of the line segment being drawn."), 6, PROP_BACKGROUND_COLOR.get());
     183    private final ImageLabel angleText = new ImageLabel("angle",
     184            tr("The angle between the previous and the current way segment."), 6, PROP_BACKGROUND_COLOR.get());
     185    private final ImageLabel distText = new ImageLabel("dist",
     186            tr("The length of the new way segment being drawn."), 10, PROP_BACKGROUND_COLOR.get());
     187    private final ImageLabel nameText = new ImageLabel("name",
     188            tr("The name of the object at the mouse pointer."), 20, PROP_BACKGROUND_COLOR.get());
    183189    private final JosmTextField helpText = new JosmTextField();
    184190    private final JProgressBar progressBar = new JProgressBar();
    185     public final BackgroundProgressMonitor progressMonitor = new BackgroundProgressMonitor();
    186 
    187     private final SoMChangeListener somListener;
     191    public final transient BackgroundProgressMonitor progressMonitor = new BackgroundProgressMonitor();
     192
     193    private final transient SoMChangeListener somListener;
    188194
    189195    // Distance value displayed in distText, stored if refresh needed after a change of system of measurement
     
    197203     * It gets destroyed by destroy() when the MapFrame itself is destroyed.
    198204     */
    199     private Thread thread;
    200 
    201     private final List<StatusTextHistory> statusText = new ArrayList<>();
     205    private transient Thread thread;
     206
     207    private final transient List<StatusTextHistory> statusText = new ArrayList<>();
    202208
    203209    private static class StatusTextHistory {
     
    649655     * The last sent mouse movement event.
    650656     */
    651     private MouseState mouseState = new MouseState();
    652 
    653     private AWTEventListener awtListener = new AWTEventListener() {
     657    private transient MouseState mouseState = new MouseState();
     658
     659    private transient AWTEventListener awtListener = new AWTEventListener() {
    654660         @Override
    655661         public void eventDispatched(AWTEvent event) {
     
    667673    };
    668674
    669     private MouseMotionListener mouseMotionListener = new MouseMotionListener() {
     675    private transient MouseMotionListener mouseMotionListener = new MouseMotionListener() {
    670676        @Override
    671677        public void mouseMoved(MouseEvent e) {
     
    683689    };
    684690
    685     private KeyAdapter keyAdapter = new KeyAdapter() {
     691    private transient KeyAdapter keyAdapter = new KeyAdapter() {
    686692        @Override public void keyPressed(KeyEvent e) {
    687693            synchronized (collector) {
     
    722728        private final JMenuItem jumpButton = add(Main.main.menu.jumpToAct);
    723729
    724         private final Collection<JCheckBoxMenuItem> somItems = new ArrayList<>();
     730        private final transient Collection<JCheckBoxMenuItem> somItems = new ArrayList<>();
    725731
    726732        private final JSeparator separator = new JSeparator();
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r8291 r8308  
    207207     * A list of all layers currently loaded.
    208208     */
    209     private final List<Layer> layers = new ArrayList<>();
     209    private final transient List<Layer> layers = new ArrayList<>();
    210210    /**
    211211     * The play head marker: there is only one of these so it isn't in any specific layer
    212212     */
    213     public PlayHeadMarker playHeadMarker = null;
     213    public transient PlayHeadMarker playHeadMarker = null;
    214214
    215215    /**
    216216     * The layer from the layers list that is currently active.
    217217     */
    218     private Layer activeLayer;
    219 
    220     private OsmDataLayer editLayer;
     218    private transient Layer activeLayer;
     219
     220    private transient OsmDataLayer editLayer;
    221221
    222222    /**
     
    225225    public MouseEvent lastMEvent = new MouseEvent(this, 0, 0, 0, 0, 0, 0, false); // In case somebody reads it before first mouse move
    226226
    227     private final List<MapViewPaintable> temporaryLayers = new LinkedList<>();
    228 
    229     private BufferedImage nonChangedLayersBuffer;
    230     private BufferedImage offscreenBuffer;
     227    private final transient List<MapViewPaintable> temporaryLayers = new LinkedList<>();
     228
     229    private transient BufferedImage nonChangedLayersBuffer;
     230    private transient BufferedImage offscreenBuffer;
    231231    // Layers that wasn't changed since last paint
    232     private final List<Layer> nonChangedLayers = new ArrayList<>();
    233     private Layer changedLayer;
     232    private final transient List<Layer> nonChangedLayers = new ArrayList<>();
     233    private transient Layer changedLayer;
    234234    private int lastViewID;
    235235    private boolean paintPreferencesChanged = true;
    236236    private Rectangle lastClipBounds = new Rectangle();
    237     private MapMover mapMover;
     237    private transient MapMover mapMover;
    238238
    239239    /**
     
    909909    }
    910910
    911     private SelectionChangedListener repaintSelectionChangedListener = new SelectionChangedListener(){
    912         @Override public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
     911    private transient SelectionChangedListener repaintSelectionChangedListener = new SelectionChangedListener(){
     912        @Override
     913        public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
    913914            repaint();
    914915        }
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r8285 r8308  
    8888    }
    8989
    90     public Predicate<OsmPrimitive> isSelectablePredicate = new Predicate<OsmPrimitive>() {
     90    public transient Predicate<OsmPrimitive> isSelectablePredicate = new Predicate<OsmPrimitive>() {
    9191        @Override
    9292        public boolean evaluate(OsmPrimitive prim) {
     
    180180    protected EastNorth center = calculateDefaultCenter();
    181181
    182     private final Object paintRequestLock = new Object();
     182    private final transient Object paintRequestLock = new Object();
    183183    private Rectangle paintRect = null;
    184184    private Polygon paintPoly = null;
    185185
    186     protected ViewportData initialViewport;
     186    protected transient ViewportData initialViewport;
    187187
    188188    /**
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java

    r6380 r8308  
    3434    public final JLabel currentAction = new JLabel("");
    3535    private final JLabel customText = new JLabel("");
    36     public final BoundedRangeModel progress = progressBar.getModel();
     36    public final transient BoundedRangeModel progress = progressBar.getModel();
    3737    private JButton btnCancel;
    3838    private JButton btnInBackground;
  • trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java

    r7005 r8308  
    6666    private JComponent component = null;
    6767
    68     private List<JButton> buttons = new ArrayList<>();
     68    private transient List<JButton> buttons = new ArrayList<>();
    6969
    7070    private Timer timer = new Timer(100, new ActionListener() {
  • trunk/src/org/openstreetmap/josm/gui/SideButton.java

    r6889 r8308  
    2727    private static final int iconHeight = 20;
    2828
    29     private PropertyChangeListener propertyChangeListener;
     29    private transient PropertyChangeListener propertyChangeListener;
    3030
    3131    public SideButton(Action action) {
  • trunk/src/org/openstreetmap/josm/gui/SplashScreen.java

    r7768 r8308  
    4040public class SplashScreen extends JFrame {
    4141
    42     private final SwingRenderingProgressMonitor progressMonitor;
     42    private final transient SwingRenderingProgressMonitor progressMonitor;
    4343
    4444    /**
  • trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java

    r8126 r8308  
    187187     */
    188188    public static class RelationMemberTableModel extends DefaultTableModel {
    189         private List<RelationToChildReference> data;
     189        private transient List<RelationToChildReference> data;
    190190
    191191        /**
  • trunk/src/org/openstreetmap/josm/gui/bbox/SizeButton.java

    r8056 r8308  
    3535    }
    3636
    37     private final MouseAdapter mouseListener = new MouseAdapter() {
     37    private final transient MouseAdapter mouseListener = new MouseAdapter() {
    3838        @Override
    3939        public void mouseReleased(MouseEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java

    r8285 r8308  
    117117    public static final String RESIZE_PROP = SlippyMapBBoxChooser.class.getName() + ".resize";
    118118
    119     private TileLoader cachedLoader;
    120     private OsmTileLoader uncachedLoader;
     119    private transient TileLoader cachedLoader;
     120    private transient OsmTileLoader uncachedLoader;
    121121
    122122    private final SizeButton iSizeButton;
    123123    private final SourceButton iSourceButton;
    124     private Bounds bbox;
     124    private transient Bounds bbox;
    125125
    126126    // upper left and lower right corners of the selection rectangle (x/y on ZOOM_MAX)
  • trunk/src/org/openstreetmap/josm/gui/bbox/SourceButton.java

    r8056 r8308  
    2929    private static final int BOTTOM_PADDING = 5;
    3030
    31     private TileSource[] sources;
     31    private transient TileSource[] sources;
    3232
    3333    private final ImageIcon enlargeImage;
     
    5757    }
    5858
    59     private final MouseListener mouseListener = new MouseAdapter() {
     59    private final transient MouseListener mouseListener = new MouseAdapter() {
    6060        @Override
    6161        public void mouseReleased(MouseEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java

    r8291 r8308  
    8383
    8484    /** the current bounding box */
    85     private Bounds bbox;
     85    private transient Bounds bbox;
    8686    /** the map viewer showing the selected bounding box */
    8787    private TileBoundsMapView mapViewer;
     
    224224        private JosmTextField tfMaxX;
    225225        private JosmTextField tfMinX;
    226         private TileCoordinateValidator valMaxY;
    227         private TileCoordinateValidator valMinY;
    228         private TileCoordinateValidator valMaxX;
    229         private TileCoordinateValidator valMinX;
     226        private transient TileCoordinateValidator valMaxY;
     227        private transient TileCoordinateValidator valMinY;
     228        private transient TileCoordinateValidator valMaxX;
     229        private transient TileCoordinateValidator valMinX;
    230230        private JSpinner spZoomLevel;
    231         private TileBoundsBuilder tileBoundsBuilder = new TileBoundsBuilder();
     231        private transient TileBoundsBuilder tileBoundsBuilder = new TileBoundsBuilder();
    232232        private boolean doFireTileBoundChanged = true;
    233233
     
    442442
    443443        private JosmTextField tfTileAddress;
    444         private TileAddressValidator valTileAddress;
     444        private transient TileAddressValidator valTileAddress;
    445445
    446446        protected JPanel buildTextPanel() {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java

    r8061 r8308  
    7272    private RelationMemberMerger relationMemberMerger;
    7373    private PropertiesMerger propertiesMerger;
    74     private final List<IConflictResolver> conflictResolvers = new ArrayList<>();
    75     private OsmPrimitive my;
    76     private OsmPrimitive their;
    77     private Conflict<? extends OsmPrimitive> conflict;
     74    private final transient List<IConflictResolver> conflictResolvers = new ArrayList<>();
     75    private transient OsmPrimitive my;
     76    private transient OsmPrimitive their;
     77    private transient Conflict<? extends OsmPrimitive> conflict;
    7878
    7979    private ImageIcon mergeComplete;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java

    r8291 r8308  
    729729     */
    730730    protected class EntriesSelectionModel extends DefaultListSelectionModel {
    731         private final List<T> entries;
     731        private final transient List<T> entries;
    732732
    733733        public EntriesSelectionModel(ArrayList<T> nodes) {
     
    823823
    824824        private int selectedIdx;
    825         private final List<ComparePairType> compareModes;
     825        private final transient List<ComparePairType> compareModes;
    826826
    827827        /**
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java

    r8056 r8308  
    5353    protected OsmPrimitivesTable theirEntriesTable;
    5454
    55     protected ListMergeModel<T> model;
     55    protected transient ListMergeModel<T> model;
    5656
    5757    private CopyStartLeftAction copyStartLeftAction;
     
    7272    private FreezeAction freezeAction;
    7373
    74     private AdjustmentSynchronizer adjustmentSynchronizer;
     74    private transient AdjustmentSynchronizer adjustmentSynchronizer;
    7575
    7676    private  JLabel lblMyVersion;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/PairTable.java

    r7937 r8308  
    1414public abstract class PairTable extends OsmPrimitivesTable {
    1515
    16     private final ListMergeModel<? extends PrimitiveId> model;
    17    
     16    private final transient ListMergeModel<? extends PrimitiveId> model;
     17
    1818    public PairTable(String name, ListMergeModel<? extends PrimitiveId> model, OsmPrimitivesTableModel dm, TableColumnModel cm, ListSelectionModel sm) {
    1919        super(dm, cm, sm);
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java

    r7029 r8308  
    2525
    2626    private final ImageIcon icon;
    27     private final Border rowNumberBorder;
     27    private final transient Border rowNumberBorder;
    2828
    2929    /**
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java

    r8291 r8308  
    289289        if (myCoords != null && theirCoords == null) return true;
    290290        if (myCoords == null && theirCoords == null) return false;
    291         return !myCoords.equalsEpsilon(theirCoords);
     291        return myCoords != null && !myCoords.equalsEpsilon(theirCoords);
    292292    }
    293293
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java

    r6890 r8308  
    4848    private JLabel lblTheirReferrers;
    4949
    50     private final PropertiesMergeModel model;
     50    private final transient PropertiesMergeModel model;
    5151
    5252    protected JLabel buildValueLabel(String name) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java

    r7029 r8308  
    2323 */
    2424public  class RelationMemberTableCellRenderer extends JLabel implements TableCellRenderer {
    25     private Border rowNumberBorder = null;
     25    private transient Border rowNumberBorder = null;
    2626
    2727    /**
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java

    r7005 r8308  
    3333
    3434    /** the list of tag merge items */
    35     private final List<TagMergeItem> tagMergeItems;
     35    private final transient List<TagMergeItem> tagMergeItems;
    3636
    3737    /** the property change listeners */
    38     private final List<PropertyChangeListener> listeners;
     38    private final transient List<PropertyChangeListener> listeners;
    3939
    4040    private int numUndecidedTags = 0;
    4141
     42    /**
     43     * Constructs a new {@code TagMergeModel}.
     44     */
    4245    public TagMergeModel() {
    4346        tagMergeItems = new ArrayList<>();
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java

    r8285 r8308  
    4242    private JTable theirTable;
    4343    private final TagMergeModel model;
    44     private AdjustmentSynchronizer adjustmentSynchronizer;
     44    private transient AdjustmentSynchronizer adjustmentSynchronizer;
    4545
    4646    /**
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java

    r8126 r8308  
    116116    private boolean canceled;
    117117    private JPanel pnlButtons;
    118     protected OsmPrimitive targetPrimitive;
     118    protected transient OsmPrimitive targetPrimitive;
    119119
    120120    /** the private help action */
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java

    r7005 r8308  
    5858
    5959    private TagConflictResolver allPrimitivesResolver;
    60     private Map<OsmPrimitiveType, TagConflictResolver> resolvers;
     60    private transient Map<OsmPrimitiveType, TagConflictResolver> resolvers;
    6161    private JTabbedPane tpResolvers;
    6262    private Mode mode;
     
    395395    private static class StatisticsTableModel extends DefaultTableModel {
    396396        private static final String[] HEADERS = new String[] {tr("Paste ..."), tr("From ..."), tr("To ...") };
    397         private List<StatisticsInfo> data;
     397        private transient List<StatisticsInfo> data;
    398398
    399399        public StatisticsTableModel() {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionEditor.java

    r7015 r8308  
    3434    }
    3535
    36     private final CellEditorSupport tableCellEditorSupport;
     36    private final transient CellEditorSupport tableCellEditorSupport;
    3737    private RelationMemberConflictDecisionType originalValue;
    3838
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverColumnModel.java

    r8005 r8308  
    2020    private final DefaultTableCellRenderer defaultTableCellRenderer = new DefaultTableCellRenderer();
    2121
    22     private final OsmPrimitivRenderer primitiveRenderer = new OsmPrimitivRenderer() {
     22    private final transient OsmPrimitivRenderer primitiveRenderer = new OsmPrimitivRenderer() {
    2323        @Override
    2424        public Component getTableCellRendererComponent(JTable table,
     
    2929    };
    3030
    31     private final TableCellRenderer tableRenderer = new TableCellRenderer() {
     31    private final transient TableCellRenderer tableRenderer = new TableCellRenderer() {
    3232        @Override
    3333        public Component getTableCellRendererComponent(JTable table, Object value,
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java

    r7661 r8308  
    3131
    3232    /** the list of conflict decisions */
    33     protected final List<RelationMemberConflictDecision> decisions;
     33    protected final transient List<RelationMemberConflictDecision> decisions;
    3434    /** the collection of relations for which we manage conflicts */
    35     protected Collection<Relation> relations;
     35    protected transient Collection<Relation> relations;
    3636    /** the number of conflicts */
    3737    private int numConflicts;
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java

    r8291 r8308  
    2222    public static final String NUM_CONFLICTS_PROP = TagConflictResolverModel.class.getName() + ".numConflicts";
    2323
    24     private TagCollection tags;
    25     private List<String> displayedKeys;
    26     private Set<String> keysWithConflicts;
    27     private Map<String, MultiValueResolutionDecision> decisions;
     24    private transient TagCollection tags;
     25    private transient List<String> displayedKeys;
     26    private transient Set<String> keysWithConflicts;
     27    private transient Map<String, MultiValueResolutionDecision> decisions;
    2828    private int numConflicts;
    2929    private PropertyChangeSupport support;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/CommandListMutableTreeNode.java

    r4918 r8308  
    1212public class CommandListMutableTreeNode extends DefaultMutableTreeNode {
    1313
    14     protected PseudoCommand cmd;
     14    protected transient PseudoCommand cmd;
    1515    protected int idx;
    1616
  • trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java

    r8285 r8308  
    6363    private final JTree redoTree = new JTree(redoTreeModel);
    6464
    65     private UndoRedoSelectionListener undoSelectionListener;
    66     private UndoRedoSelectionListener redoSelectionListener;
     65    private transient UndoRedoSelectionListener undoSelectionListener;
     66    private transient UndoRedoSelectionListener redoSelectionListener;
    6767
    6868    private JScrollPane scrollPane;
     
    246246     * Simple listener setup to update the button enabled state when the side dialog shows.
    247247     */
    248     private Set<IEnabledStateUpdating> showNotifyListener = new LinkedHashSet<>();
     248    private transient Set<IEnabledStateUpdating> showNotifyListener = new LinkedHashSet<>();
    249249
    250250    private void addShowNotifyListener(IEnabledStateUpdating listener) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java

    r7949 r8308  
    7777
    7878    /** the collection of conflicts displayed by this conflict dialog */
    79     private ConflictCollection conflicts;
     79    private transient ConflictCollection conflicts;
    8080
    8181    /** the model for the list of conflicts */
    82     private ConflictListModel model;
     82    private transient ConflictListModel model;
    8383    /** the list widget for the list of conflicts */
    8484    private JList<OsmPrimitive> lstConflicts;
    8585
    8686    private final JPopupMenu popupMenu = new JPopupMenu();
    87     private final PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu);
     87    private final transient PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu);
    8888
    8989    private ResolveAction actResolve;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java

    r7864 r8308  
    1919
    2020public class DialogsPanel extends JPanel implements Destroyable {
    21     protected List<ToggleDialog> allDialogs = new ArrayList<>();
     21    protected transient List<ToggleDialog> allDialogs = new ArrayList<>();
    2222    protected MultiSplitPane mSpltPane = new MultiSplitPane();
    2323    protected static final int DIVIDER_SIZE = 5;
     
    2626     * Panels that are added to the multisplitpane.
    2727     */
    28     private List<JPanel> panels = new ArrayList<>();
     28    private transient List<JPanel> panels = new ArrayList<>();
    2929
    3030    private final JSplitPane parent;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java

    r7775 r8308  
    368368    abstract class AbstractFilterAction extends AbstractAction implements MultikeyShortcutAction {
    369369
    370         protected Filter lastFilter;
     370        protected transient Filter lastFilter;
    371371
    372372        @Override
  • trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java

    r7005 r8308  
    5454    }
    5555
    56     private final List<Filter> filters = new LinkedList<>();
    57     private final FilterMatcher filterMatcher = new FilterMatcher();
     56    private final transient List<Filter> filters = new LinkedList<>();
     57    private final transient FilterMatcher filterMatcher = new FilterMatcher();
    5858
    5959    private void updateFilters() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java

    r8285 r8308  
    6060public class InspectPrimitiveDialog extends ExtendedDialog {
    6161
    62     protected List<OsmPrimitive> primitives;
    63     protected OsmDataLayer layer;
     62    protected transient List<OsmPrimitive> primitives;
     63    protected transient OsmDataLayer layer;
    6464    private JosmTextArea txtMappaint;
    6565    private boolean mappaintTabLoaded;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r8293 r8308  
    133133    }
    134134
    135     private final Shortcut[] visibilityToggleShortcuts = new Shortcut[10];
     135    private final transient Shortcut[] visibilityToggleShortcuts = new Shortcut[10];
    136136    private final ToggleLayerIndexVisibility[] visibilityToggleActions = new ToggleLayerIndexVisibility[10];
    137137
     
    440440    public final class ShowHideLayerAction extends AbstractAction implements IEnabledStateUpdating, LayerAction, MultikeyShortcutAction {
    441441
    442         private WeakReference<Layer> lastLayer;
    443         private Shortcut multikeyShortcut;
     442        private transient WeakReference<Layer> lastLayer;
     443        private transient Shortcut multikeyShortcut;
    444444
    445445        /**
     
    526526     */
    527527    public final class LayerOpacityAction extends AbstractAction implements IEnabledStateUpdating, LayerAction {
    528         private Layer layer;
     528        private transient Layer layer;
    529529        private JPopupMenu popup;
    530530        private JSlider slider = new JSlider(JSlider.VERTICAL);
     
    637637
    638638    public final class ActivateLayerAction extends AbstractAction implements IEnabledStateUpdating, MapView.LayerChangeListener, MultikeyShortcutAction{
    639         private Layer layer;
    640         private Shortcut multikeyShortcut;
     639        private transient Layer layer;
     640        private transient Shortcut multikeyShortcut;
    641641
    642642        /**
     
    749749     */
    750750    public final class MergeAction extends AbstractAction implements IEnabledStateUpdating {
    751         private Layer layer;
     751        private transient Layer layer;
    752752
    753753        /**
     
    824824     */
    825825    public final class DuplicateAction extends AbstractAction implements IEnabledStateUpdating {
    826         private Layer layer;
     826        private transient Layer layer;
    827827
    828828        /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java

    r7509 r8308  
    3232
    3333    public static final class InfoAction extends AbstractAction {
    34         private final Layer layer;
     34        private final transient Layer layer;
    3535
    3636        /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java

    r8285 r8308  
    206206    protected class StylesModel extends AbstractTableModel implements MapPaintSylesUpdateListener {
    207207
    208         private List<StyleSource> data = new ArrayList<>();
     208        private transient List<StyleSource> data = new ArrayList<>();
    209209
    210210        public StylesModel() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java

    r8225 r8308  
    8787    private final UploadNotesAction uploadAction;
    8888
    89     private NoteData noteData;
     89    private transient NoteData noteData;
    9090
    9191    /** Creates a new toggle dialog for notes */
     
    261261
    262262    class NoteTableModel extends AbstractListModel<Note> {
    263         private List<Note> data;
     263        private transient List<Note> data;
    264264
    265265        public NoteTableModel() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java

    r7937 r8308  
    5151    protected final OsmIdTextField tfId = new OsmIdTextField();
    5252    protected final HistoryComboBox cbId = new HistoryComboBox();
    53     protected final GroupLayout layout = new GroupLayout(panel);
     53    protected final transient GroupLayout layout = new GroupLayout(panel);
    5454
    5555    public OsmIdSelectionDialog(Component parent, String title, String[] buttonTexts) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r8285 r8308  
    9696    /** the popup menu and its handler */
    9797    private final JPopupMenu popupMenu = new JPopupMenu();
    98     private final PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu);
     98    private final transient PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu);
    9999
    100100    private final JosmTextField filter;
     
    116116    private final AddSelectionToRelations addSelectionToRelations = new AddSelectionToRelations();
    117117
    118     private final HighlightHelper highlightHelper = new HighlightHelper();
     118    private final transient HighlightHelper highlightHelper = new HighlightHelper();
    119119    private boolean highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true);
    120120
     
    390390     */
    391391    private class RelationListModel extends AbstractListModel<Relation> {
    392         private final List<Relation> relations = new ArrayList<>();
    393         private List<Relation> filteredRelations;
     392        private final transient List<Relation> relations = new ArrayList<>();
     393        private transient List<Relation> filteredRelations;
    394394        private DefaultListSelectionModel selectionModel;
    395         private SearchCompiler.Match filter;
     395        private transient SearchCompiler.Match filter;
    396396
    397397        public RelationListModel(DefaultListSelectionModel selectionModel) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r7949 r8308  
    9898    /** the popup menu and its handler */
    9999    private final ListPopupMenu popupMenu;
    100     private final PopupMenuHandler popupMenuHandler;
     100    private final transient PopupMenuHandler popupMenuHandler;
    101101
    102102    /**
     
    477477        // Variable to store history from currentDataSet()
    478478        private LinkedList<Collection<? extends OsmPrimitive>> history;
    479         private final List<OsmPrimitive> selection = new ArrayList<>();
     479        private final transient List<OsmPrimitive> selection = new ArrayList<>();
    480480        private DefaultListSelectionModel selectionModel;
    481481
     
    737737     */
    738738    protected static class SearchMenuItem extends JMenuItem implements ActionListener {
    739         protected final SearchSetting s;
     739        protected final transient SearchSetting s;
    740740
    741741        public SearchMenuItem(SearchSetting s) {
     
    778778     */
    779779    protected static class SelectionMenuItem extends JMenuItem implements ActionListener {
    780         private final DefaultNameFormatter df = DefaultNameFormatter.getInstance();
    781         protected Collection<? extends OsmPrimitive> sel;
     780        private final transient DefaultNameFormatter df = DefaultNameFormatter.getInstance();
     781        protected transient Collection<? extends OsmPrimitive> sel;
    782782
    783783        public SelectionMenuItem(Collection<? extends OsmPrimitive> sel) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r8081 r8308  
    9595    public static final BooleanProperty PROP_DYNAMIC_BUTTONS = new BooleanProperty("dialog.dynamic.buttons", false);
    9696
    97     private final ParametrizedEnumProperty<ButtonHidingType> PROP_BUTTON_HIDING = new ParametrizedEnumProperty<ToggleDialog.ButtonHidingType>(
     97    private final transient ParametrizedEnumProperty<ButtonHidingType> PROP_BUTTON_HIDING = new ParametrizedEnumProperty<ToggleDialog.ButtonHidingType>(
    9898            ButtonHidingType.class, ButtonHidingType.DYNAMIC) {
    9999        @Override
     
    152152    protected JToggleButton button;
    153153    private JPanel buttonsPanel;
    154     private List<javax.swing.Action> buttonActions = new ArrayList<>();
     154    private transient List<javax.swing.Action> buttonActions = new ArrayList<>();
    155155
    156156    /** holds the menu entry in the windows menu. Required to properly
  • trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java

    r8304 r8308  
    279279     */
    280280    static class UserTableModel extends DefaultTableModel {
    281         private List<UserInfo> data;
     281        private transient List<UserInfo> data;
    282282
    283283        public UserTableModel() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r7949 r8308  
    7878
    7979    private final JPopupMenu popupMenu = new JPopupMenu();
    80     private final PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu);
     80    private final transient PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu);
    8181
    8282    /** Last selected element */
    8383    private DefaultMutableTreeNode lastSelectedNode = null;
    8484
    85     private OsmDataLayer linkedLayer;
     85    private transient OsmDataLayer linkedLayer;
    8686
    8787    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java

    r7005 r8308  
    3030    public static final String CHANGESET_IN_DETAIL_VIEW_PROP = ChangesetCacheManagerModel.class.getName() + ".changesetInDetailView";
    3131
    32     private final List<Changeset> data = new ArrayList<>();
     32    private final transient List<Changeset> data = new ArrayList<>();
    3333    private DefaultListSelectionModel selectionModel;
    34     private Changeset changesetInDetailView;
     34    private transient Changeset changesetInDetailView;
    3535    private final PropertyChangeSupport support = new PropertyChangeSupport(this);
    3636
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java

    r7704 r8308  
    6262
    6363    private ChangesetContentTableModel model;
    64     private Changeset currentChangeset;
     64    private transient Changeset currentChangeset;
    6565
    6666    private DownloadChangesetContentAction actDownloadContentAction;
     
    421421
    422422        private JMultilineLabel lblMessage;
    423         private Changeset current;
     423        private transient Changeset current;
    424424
    425425        protected final void build() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableModel.java

    r7715 r8308  
    2424public class ChangesetContentTableModel extends AbstractTableModel {
    2525
    26     private final List<ChangesetContentEntry> data = new ArrayList<>();
     26    private final transient List<ChangesetContentEntry> data = new ArrayList<>();
    2727    private DefaultListSelectionModel selectionModel;
    2828
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java

    r7434 r8308  
    6464    private final ZoomInCurrentLayerAction       actZoomInCurrentLayerAction = new ZoomInCurrentLayerAction();
    6565
    66     private Changeset current = null;
     66    private transient Changeset current = null;
    6767
    6868    protected JPanel buildActionButtonPanel() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionPanel.java

    r7948 r8308  
    4040    private JTable table;
    4141
    42     private Changeset current = null;
     42    private transient Changeset current = null;
    4343
    4444    protected JPanel buildActionButtonPanel() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionTableModel.java

    r7937 r8308  
    1515public class ChangesetDiscussionTableModel extends AbstractTableModel {
    1616
    17     private final List<ChangesetDiscussionComment> data = new ArrayList<>();
     17    private final transient List<ChangesetDiscussionComment> data = new ArrayList<>();
    1818
    1919    @Override
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java

    r7005 r8308  
    2222
    2323public class ChangesetListModel extends DefaultListModel<Changeset> implements ChangesetCacheListener {
    24     private final List<Changeset> data = new ArrayList<>();
    25     private final Storage<Changeset> shownChangesets = new Storage<>(true);
     24    private final transient List<Changeset> data = new ArrayList<>();
     25    private final transient Storage<Changeset> shownChangesets = new Storage<>(true);
    2626    private DefaultListSelectionModel selectionModel;
    2727
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java

    r8291 r8308  
    379379        private JRadioButton rbRestrictToUserName;
    380380        private JosmTextField tfUid;
    381         private UidInputFieldValidator valUid;
     381        private transient UidInputFieldValidator valUid;
    382382        private JosmTextField tfUserName;
    383         private UserNameInputValidator valUserName;
     383        private transient UserNameInputValidator valUserName;
    384384        private JMultilineLabel lblRestrictedToMyself;
    385385
     
    639639        private JRadioButton rbClosedAfterAndCreatedBefore;
    640640        private JosmTextField tfClosedAfterDate1;
    641         private DateValidator valClosedAfterDate1;
     641        private transient DateValidator valClosedAfterDate1;
    642642        private JosmTextField tfClosedAfterTime1;
    643         private TimeValidator valClosedAfterTime1;
     643        private transient TimeValidator valClosedAfterTime1;
    644644        private JosmTextField tfClosedAfterDate2;
    645         private DateValidator valClosedAfterDate2;
     645        private transient DateValidator valClosedAfterDate2;
    646646        private JosmTextField tfClosedAfterTime2;
    647         private TimeValidator valClosedAfterTime2;
     647        private transient TimeValidator valClosedAfterTime2;
    648648        private JosmTextField tfCreatedBeforeDate;
    649         private DateValidator valCreatedBeforeDate;
     649        private transient DateValidator valCreatedBeforeDate;
    650650        private JosmTextField tfCreatedBeforeTime;
    651         private TimeValidator valCreatedBeforeTime;
     651        private transient TimeValidator valCreatedBeforeTime;
    652652
    653653        protected JPanel buildClosedAfterInputPanel() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java

    r7005 r8308  
    4141    }
    4242
    43     private Map<BasicQuery, JRadioButton> rbQueries;
    44     private Map<BasicQuery, JMultilineLabel> lblQueries;
     43    private transient Map<BasicQuery, JRadioButton> rbQueries;
     44    private transient Map<BasicQuery, JMultilineLabel> lblQueries;
    4545    private JCheckBox cbMyChangesetsOnly;
    4646
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r8304 r8308  
    153153
    154154    // Popup menu handlers
    155     private final PopupMenuHandler tagMenuHandler = new PopupMenuHandler(tagMenu);
    156     private final PopupMenuHandler membershipMenuHandler = new PopupMenuHandler(membershipMenu);
    157     private final PopupMenuHandler blankSpaceMenuHandler = new PopupMenuHandler(blankSpaceMenu);
    158 
    159     private final Map<String, Map<String, Integer>> valueCount = new TreeMap<>();
     155    private final transient PopupMenuHandler tagMenuHandler = new PopupMenuHandler(tagMenu);
     156    private final transient PopupMenuHandler membershipMenuHandler = new PopupMenuHandler(membershipMenu);
     157    private final transient PopupMenuHandler blankSpaceMenuHandler = new PopupMenuHandler(blankSpaceMenu);
     158
     159    private final transient Map<String, Map<String, Integer>> valueCount = new TreeMap<>();
    160160    /**
    161161     * This sub-object is responsible for all adding and editing of tags
    162162     */
    163     private final TagEditHelper editHelper = new TagEditHelper(tagData, valueCount);
    164 
    165     private final DataSetListenerAdapter dataChangedAdapter = new DataSetListenerAdapter(this);
     163    private final transient TagEditHelper editHelper = new TagEditHelper(tagData, valueCount);
     164
     165    private final transient DataSetListenerAdapter dataChangedAdapter = new DataSetListenerAdapter(this);
    166166    private final HelpAction helpAction = new HelpAction();
    167167    private final PasteValueAction pasteValueAction = new PasteValueAction();
     
    187187    private final SelectMembersAction addMembersToSelectionAction = new SelectMembersAction(true);
    188188
    189     private final HighlightHelper highlightHelper= new HighlightHelper();
     189    private final transient HighlightHelper highlightHelper= new HighlightHelper();
    190190
    191191    /**
     
    212212            + tr("Select objects for which to change tags.") + "</p></html>");
    213213
    214     private final PresetHandler presetHandler = new PresetHandler() {
     214    private final transient PresetHandler presetHandler = new PresetHandler() {
    215215        @Override public void updateTags(List<Tag> tags) {
    216216            Command command = TaggingPreset.createCommand(getSelection(), tags);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r8285 r8308  
    242242    public final class EditTagDialog extends AbstractTagsDialog {
    243243        private final String key;
    244         private final Map<String, Integer> m;
    245 
    246         private Comparator<AutoCompletionListItem> usedValuesAwareComparator = new Comparator<AutoCompletionListItem>() {
     244        private final transient Map<String, Integer> m;
     245
     246        private transient Comparator<AutoCompletionListItem> usedValuesAwareComparator = new Comparator<AutoCompletionListItem>() {
    247247                @Override
    248248                public int compare(AutoCompletionListItem o1, AutoCompletionListItem o2) {
     
    258258            };
    259259
    260         private ListCellRenderer<AutoCompletionListItem> cellRenderer = new ListCellRenderer<AutoCompletionListItem>() {
     260        private transient ListCellRenderer<AutoCompletionListItem> cellRenderer = new ListCellRenderer<AutoCompletionListItem>() {
    261261            private final DefaultListCellRenderer def = new DefaultListCellRenderer();
    262262            @Override
     
    532532
    533533    class AddTagsDialog extends AbstractTagsDialog {
    534         private List<JosmAction> recentTagsActions = new ArrayList<>();
     534        private transient List<JosmAction> recentTagsActions = new ArrayList<>();
    535535
    536536        // Counter of added commands for possible undo
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java

    r8291 r8308  
    5858    private RelationTree childTree;
    5959    /**  the tree model */
    60     private RelationTreeModel model;
     60    private transient RelationTreeModel model;
    6161
    6262    /** the osm data layer this browser is related to */
    63     private OsmDataLayer layer;
     63    private transient OsmDataLayer layer;
    6464
    6565    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberRoleCellEditor.java

    r8005 r8308  
    1616public class MemberRoleCellEditor extends AbstractCellEditor implements TableCellEditor {
    1717    private AutoCompletingTextField editor = null;
    18     private final DataSet ds;
    19     private final Relation relation;
     18    private final transient DataSet ds;
     19    private final transient Relation relation;
    2020
    2121    /** user input is matched against this list of auto completion items */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java

    r8285 r8308  
    4545    /** the additional actions in popup menu */
    4646    private ZoomToGapAction zoomToGap;
    47     private HighlightHelper highlightHelper = new HighlightHelper();
     47    private transient HighlightHelper highlightHelper = new HighlightHelper();
    4848    private boolean highlightEnabled;
    4949
     
    122122    }
    123123
    124     private ListSelectionListener highlighterListener = new ListSelectionListener() {
     124    private transient ListSelectionListener highlighterListener = new ListSelectionListener() {
    125125            @Override
    126126            public void valueChanged(ListSelectionEvent lse) {
     
    269269    private class ZoomToGapAction extends AbstractAction implements LayerChangeListener, ListSelectionListener {
    270270
     271        /**
     272         * Constructs a new {@code ZoomToGapAction}.
     273         */
    271274        public ZoomToGapAction() {
    272275            putValue(NAME, tr("Zoom to Gap"));
     
    279282        }
    280283
    281         private final Collection<Direction> connectionTypesOfInterest = Arrays.asList(WayConnectionType.Direction.FORWARD, WayConnectionType.Direction.BACKWARD);
     284        private final transient Collection<Direction> connectionTypesOfInterest = Arrays.asList(
     285                WayConnectionType.Direction.FORWARD, WayConnectionType.Direction.BACKWARD);
    282286
    283287        private boolean hasGap() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java

    r8285 r8308  
    2222    private static final Image roundabout_right = ImageProvider.get("dialogs/relation", "roundabout_right_tiny").getImage();
    2323    private static final Image roundabout_left = ImageProvider.get("dialogs/relation", "roundabout_left_tiny").getImage();
    24     private WayConnectionType value = new WayConnectionType();
     24    private transient WayConnectionType value = new WayConnectionType();
    2525
    2626    @Override
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java

    r7552 r8308  
    4949     * data of the table model: The list of members and the cached WayConnectionType of each member.
    5050     **/
    51     private List<RelationMember> members;
    52     private List<WayConnectionType> connectionType = null;
     51    private transient List<RelationMember> members;
     52    private transient List<WayConnectionType> connectionType = null;
    5353
    5454    private DefaultListSelectionModel listSelectionModel;
    5555    private final CopyOnWriteArrayList<IMemberModelListener> listeners;
    56     private final OsmDataLayer layer;
    57     private final PresetHandler presetHandler;
    58 
    59     private final WayConnectionTypeCalculator wayConnectionTypeCalculator = new WayConnectionTypeCalculator();
    60     private final RelationSorter relationSorter = new RelationSorter();
     56    private final transient OsmDataLayer layer;
     57    private final transient PresetHandler presetHandler;
     58
     59    private final transient WayConnectionTypeCalculator wayConnectionTypeCalculator = new WayConnectionTypeCalculator();
     60    private final transient RelationSorter relationSorter = new RelationSorter();
    6161
    6262    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java

    r7005 r8308  
    3838    private JList<Relation> referrers;
    3939    private ReferringRelationsBrowserModel model;
    40     private OsmDataLayer layer;
     40    private transient OsmDataLayer layer;
    4141    private JCheckBox cbReadFull;
    4242    private EditAction editAction;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowserModel.java

    r7005 r8308  
    1414
    1515    /** the relation */
    16     private Relation relation;
    17     private List<Relation> referrers;
     16    private transient Relation relation;
     17    private transient List<Relation> referrers;
    1818
    1919    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java

    r8291 r8308  
    5151     * The relation that this editor is working on.
    5252     */
    53     private Relation relation;
     53    private transient Relation relation;
    5454
    5555    /**
    5656     * The version of the relation when editing is started.  This is
    5757     * null if a new relation is created. */
    58     private Relation relationSnapshot;
     58    private transient Relation relationSnapshot;
    5959
    6060    /** the data layer the relation belongs to */
    61     private OsmDataLayer layer;
     61    private transient OsmDataLayer layer;
    6262
    6363    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java

    r8291 r8308  
    1919
    2020    /** this selection table model only displays selected primitives in this layer */
    21     private OsmDataLayer layer;
    22     private List<OsmPrimitive> cache;
     21    private transient OsmDataLayer layer;
     22    private transient List<OsmPrimitive> cache;
    2323
    2424    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java

    r7270 r8308  
    6161
    6262    /** The list of errors shown in the tree */
    63     private List<TestError> errors = new ArrayList<>();
     63    private transient List<TestError> errors = new ArrayList<>();
    6464
    6565    /**
     
    6767     * that refer to one of the primitives in the filter.
    6868     */
    69     private Set<OsmPrimitive> filter = null;
     69    private transient Set<OsmPrimitive> filter = null;
    7070
    7171    /** a counter to check if tree has been rebuild */
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r8215 r8308  
    7070
    7171    protected SlippyMapChooser slippyMapChooser;
    72     protected final List<DownloadSelection> downloadSelections = new ArrayList<>();
     72    protected final transient List<DownloadSelection> downloadSelections = new ArrayList<>();
    7373    protected final JTabbedPane tpDownloadAreaSelectors = new JTabbedPane();
    7474    protected JCheckBox cbNewLayer;
    7575    protected JCheckBox cbStartup;
    7676    protected final JLabel sizeCheck = new JLabel();
    77     protected Bounds currentBounds = null;
     77    protected transient Bounds currentBounds = null;
    7878    protected boolean canceled;
    7979
  • trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java

    r8304 r8308  
    328328        private String searchExpression;
    329329        private HttpURLConnection connection;
    330         private List<SearchResult> data;
     330        private transient List<SearchResult> data;
    331331        private boolean canceled = false;
    332332        private Server useserver;
     
    409409
    410410    static class NamedResultTableModel extends DefaultTableModel {
    411         private List<SearchResult> data;
    412         private ListSelectionModel selectionModel;
     411        private transient List<SearchResult> data;
     412        private transient ListSelectionModel selectionModel;
    413413
    414414        public NamedResultTableModel(ListSelectionModel selectionModel) {
  • trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java

    r8126 r8308  
    114114
    115115    /** the help browser history */
    116     private HelpBrowserHistory history;
     116    private transient HelpBrowserHistory history;
    117117
    118118    /** the currently displayed URL */
    119119    private String url;
    120120
    121     private HelpContentReader reader;
     121    private transient HelpContentReader reader;
    122122
    123123    private static final JosmAction focusAction = new JosmAction(tr("JOSM Help Browser"), "help", "", null, false, false) {
     
    483483
    484484    static class BackAction extends AbstractAction implements Observer {
    485         private HelpBrowserHistory history;
     485        private transient HelpBrowserHistory history;
    486486        public BackAction(HelpBrowserHistory history) {
    487487            this.history = history;
     
    503503
    504504    static class ForwardAction extends AbstractAction implements Observer {
    505         private HelpBrowserHistory history;
     505        private transient HelpBrowserHistory history;
    506506        public ForwardAction(HelpBrowserHistory history) {
    507507            this.history = history;
  • trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java

    r8291 r8308  
    4444    public String fetchHelpTopicContent(String helpTopicUrl, boolean dotest) throws HelpContentReaderException {
    4545        if(helpTopicUrl == null)
    46             throw new MissingHelpContentException(helpTopicUrl);
     46            throw new MissingHelpContentException("helpTopicUrl is null");
    4747        HttpURLConnection con = null;
    4848        try {
  • trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java

    r8291 r8308  
    3232
    3333    /** the model */
    34     private HistoryBrowserModel model;
     34    private transient HistoryBrowserModel model;
    3535    /** the common info panel for the history node in role REFERENCE_POINT_IN_TIME */
    3636    private VersionInfoPanel referenceInfoPanel;
     
    171171        private JLabel lblLat;
    172172        private JLabel lblLon;
    173         private HistoryBrowserModel model;
     173        private transient HistoryBrowserModel model;
    174174        private PointInTimeType role;
    175175
  • trunk/src/org/openstreetmap/josm/gui/history/DiffTableModel.java

    r8219 r8308  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.history;
    3 
    4 import static org.openstreetmap.josm.tools.I18n.tr;
    53
    64import java.util.ArrayList;
     
    1614 */
    1715class DiffTableModel extends AbstractTableModel {
    18     private List<TwoColumnDiff.Item> rows = new ArrayList<>();
     16    private transient List<TwoColumnDiff.Item> rows = new ArrayList<>();
    1917    private boolean reversed = false;
    2018
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowser.java

    r6666 r8308  
    2424
    2525    /** the model */
    26     private HistoryBrowserModel model;
     26    private transient HistoryBrowserModel model;
    2727    private TagInfoViewer tagInfoViewer;
    2828    private NodeListViewer nodeListViewer;
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r8291 r8308  
    531531    public class TagTableModel extends AbstractTableModel {
    532532
    533         private List<String> keys;
     533        private transient List<String> keys;
    534534        private PointInTimeType pointInTimeType;
    535535
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryViewerPanel.java

    r7937 r8308  
    1717 */
    1818public abstract class HistoryViewerPanel extends JPanel {
    19    
    20     protected HistoryBrowserModel model;
     19
     20    protected transient HistoryBrowserModel model;
    2121    protected VersionInfoPanel referenceInfoPanel;
    2222    protected VersionInfoPanel currentInfoPanel;
    23     protected AdjustmentSynchronizer adjustmentSynchronizer;
    24     protected SelectionSynchronizer selectionSynchronizer;
     23    protected transient AdjustmentSynchronizer adjustmentSynchronizer;
     24    protected transient SelectionSynchronizer selectionSynchronizer;
    2525
    2626    protected HistoryViewerPanel(HistoryBrowserModel model) {
     
    2828        build();
    2929    }
    30    
     30
    3131    private JScrollPane embedInScrollPane(JTable table) {
    3232        JScrollPane pane = new JScrollPane(table);
     
    3434        return pane;
    3535    }
    36    
     36
    3737    /**
    3838     * Sets the history browsing model.
     
    4848        }
    4949    }
    50    
     50
    5151    protected final void unregisterAsObserver(HistoryBrowserModel model) {
    5252        if (currentInfoPanel != null) {
     
    5757        }
    5858    }
    59    
     59
    6060    protected final void registerAsObserver(HistoryBrowserModel model) {
    6161        if (currentInfoPanel != null) {
     
    6666        }
    6767    }
    68    
     68
    6969    protected abstract JTable buildReferenceTable();
    70    
     70
    7171    protected abstract JTable buildCurrentTable();
    72    
     72
    7373    private void build() {
    7474        setLayout(new GridBagLayout());
  • trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java

    r8285 r8308  
    4848public class NodeListViewer extends JPanel {
    4949
    50     private HistoryBrowserModel model;
     50    private transient HistoryBrowserModel model;
    5151    private VersionInfoPanel referenceInfoPanel;
    5252    private VersionInfoPanel currentInfoPanel;
    53     private AdjustmentSynchronizer adjustmentSynchronizer;
    54     private SelectionSynchronizer selectionSynchronizer;
     53    private transient AdjustmentSynchronizer adjustmentSynchronizer;
     54    private transient SelectionSynchronizer selectionSynchronizer;
    5555    private NodeListPopupMenu popupMenu;
    5656
     
    215215
    216216    static class ZoomToNodeAction extends AbstractAction {
    217         private PrimitiveId primitiveId;
    218 
     217        private transient PrimitiveId primitiveId;
     218
     219        /**
     220         * Constructs a new {@code ZoomToNodeAction}.
     221         */
    219222        public ZoomToNodeAction() {
    220223            putValue(NAME, tr("Zoom to node"));
     
    258261
    259262    static class ShowHistoryAction extends AbstractAction {
    260         private PrimitiveId primitiveId;
    261 
     263        private transient PrimitiveId primitiveId;
     264
     265        /**
     266         * Constructs a new {@code ShowHistoryAction}.
     267         */
    262268        public ShowHistoryAction() {
    263269            putValue(NAME, tr("Show history"));
  • trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java

    r7005 r8308  
    3131    public static final Color BGCOLOR_SELECTED = new Color(143,170,255);
    3232
    33     private Map<OsmPrimitiveType, ImageIcon> icons;
     33    private transient Map<OsmPrimitiveType, ImageIcon> icons;
    3434
    3535    /**
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r8304 r8308  
    4646public class VersionInfoPanel extends JPanel implements Observer{
    4747    private PointInTimeType pointInTimeType;
    48     private HistoryBrowserModel model;
     48    private transient HistoryBrowserModel model;
    4949    private JMultilineLabel lblInfo;
    5050    private UrlLabel lblUser;
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java

    r7933 r8308  
    4646public class VersionTable extends JTable implements Observer{
    4747    private VersionTablePopupMenu popupMenu;
    48     private final HistoryBrowserModel model;
     48    private final transient HistoryBrowserModel model;
    4949
    5050    protected void build() {
     
    148148
    149149    static class ChangesetInfoAction extends AbstractInfoAction {
    150         private HistoryOsmPrimitive primitive;
    151 
     150        private transient HistoryOsmPrimitive primitive;
     151
     152        /**
     153         * Constructs a new {@code ChangesetInfoAction}.
     154         */
    152155        public ChangesetInfoAction() {
    153156            super(true);
     
    178181
    179182    static class UserInfoAction extends AbstractInfoAction {
    180         private HistoryOsmPrimitive primitive;
    181 
     183        private transient HistoryOsmPrimitive primitive;
     184
     185        /**
     186         * Constructs a new {@code UserInfoAction}.
     187         */
    182188        public UserInfoAction() {
    183189            super(true);
  • trunk/src/org/openstreetmap/josm/gui/io/ActionFlagsTableCell.java

    r7937 r8308  
    3838class ActionFlagsTableCell extends JPanel implements TableCellRenderer, TableCellEditor {
    3939    private final JCheckBox[] checkBoxes = new JCheckBox[2];
    40     private final CellEditorSupport cellEditorSupport = new CellEditorSupport(this);
     40    private final transient CellEditorSupport cellEditorSupport = new CellEditorSupport(this);
    4141
    42     private ActionListener al = new ActionListener() {
     42    private transient ActionListener al = new ActionListener() {
    4343        @Override
    4444        public void actionPerformed(ActionEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java

    r8291 r8308  
    4949    private final UploadParameterSummaryPanel pnlUploadParameterSummary = new UploadParameterSummaryPanel();
    5050    /** the changeset comment model */
    51     private final ChangesetCommentModel changesetCommentModel;
    52     private final ChangesetCommentModel changesetSourceModel;
     51    private final transient ChangesetCommentModel changesetCommentModel;
     52    private final transient ChangesetCommentModel changesetSourceModel;
    5353
    5454    protected JPanel buildUploadCommentPanel() {
  • trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java

    r8291 r8308  
    5656    private JCheckBox cbCloseAfterUpload;
    5757    private OpenChangesetComboBoxModel model;
    58     private ChangesetCommentModel changesetCommentModel;
     58    private transient ChangesetCommentModel changesetCommentModel;
    5959
    6060    /**
  • trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java

    r7937 r8308  
    4242    private static final GBC defaultCellStyle = GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 0);
    4343
    44     private final CellEditorSupport cellEditorSupport = new CellEditorSupport(this);
     44    private final transient CellEditorSupport cellEditorSupport = new CellEditorSupport(this);
    4545    private File value;
    4646
  • trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java

    r7017 r8308  
    1818 */
    1919public class OpenChangesetComboBoxModel extends DefaultComboBoxModel<Changeset> implements ChangesetCacheListener {
    20     private List<Changeset> changesets;
    21     private Changeset selectedChangeset = null;
     20    private transient List<Changeset> changesets;
     21    private transient Changeset selectedChangeset = null;
    2222
    2323    protected Changeset getChangesetById(long id) {
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java

    r8285 r8308  
    6868    private DiscardAndProceedAction discardAndProceedAction;
    6969    private CancelAction cancelAction;
    70     private SaveAndUploadTask saveAndUploadTask;
     70    private transient SaveAndUploadTask saveAndUploadTask;
    7171
    7272    /**
     
    368368        private static final int is = 24; // icon size
    369369        private static final String BASE_ICON = "BASE_ICON";
    370         private final Image save = ImageProvider.get("save").getImage();
    371         private final Image upld = ImageProvider.get("upload").getImage();
    372         private final Image saveDis = new BufferedImage(is, is, BufferedImage.TYPE_4BYTE_ABGR);
    373         private final Image upldDis = new BufferedImage(is, is, BufferedImage.TYPE_4BYTE_ABGR);
     370        private final transient Image save = ImageProvider.get("save").getImage();
     371        private final transient Image upld = ImageProvider.get("upload").getImage();
     372        private final transient Image saveDis = new BufferedImage(is, is, BufferedImage.TYPE_4BYTE_ABGR);
     373        private final transient Image upldDis = new BufferedImage(is, is, BufferedImage.TYPE_4BYTE_ABGR);
    374374
    375375        public SaveAndProceedAction() {
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersModel.java

    r7402 r8308  
    2222    }
    2323
    24     private List<SaveLayerInfo> layerInfo;
     24    private transient List<SaveLayerInfo> layerInfo;
    2525    private Mode mode;
    2626    private PropertyChangeSupport support;
  • trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java

    r8291 r8308  
    2424    private final TagEditorPanel pnlTagEditor = new TagEditorPanel(null);
    2525    /** the model for the changeset comment */
    26     private final ChangesetCommentModel changesetCommentModel;
    27     private final ChangesetCommentModel changesetSourceModel;
     26    private final transient ChangesetCommentModel changesetCommentModel;
     27    private final transient ChangesetCommentModel changesetSourceModel;
    2828    /** tags that applied to uploaded changesets by default*/
    29     private final Map<String, String> defaultTags = new HashMap<>();
     29    private final transient Map<String, String> defaultTags = new HashMap<>();
    3030
    3131    protected void build() {
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r8177 r8308  
    9898
    9999    /** the changeset comment model keeping the state of the changeset comment */
    100     private final ChangesetCommentModel changesetCommentModel = new ChangesetCommentModel();
    101     private final ChangesetCommentModel changesetSourceModel = new ChangesetCommentModel();
     100    private final transient ChangesetCommentModel changesetCommentModel = new ChangesetCommentModel();
     101    private final transient ChangesetCommentModel changesetSourceModel = new ChangesetCommentModel();
    102102
    103103    /**
  • trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java

    r8061 r8308  
    2222// FIXME this class should extend HtmlPanel instead (duplicated code in here)
    2323public class UploadParameterSummaryPanel extends JPanel implements HyperlinkListener, PropertyChangeListener{
    24     private UploadStrategySpecification spec = new UploadStrategySpecification();
     24    private transient UploadStrategySpecification spec = new UploadStrategySpecification();
    2525    private int numObjects;
    2626    private JMultilineLabel jepMessage;
    2727    private JLabel lblWarning;
    2828
    29     private Changeset selectedChangeset;
     29    private transient Changeset selectedChangeset;
    3030    private boolean closeChangesetAfterNextUpload;
    31     private ConfigurationParameterRequestHandler configHandler;
     31    private transient ConfigurationParameterRequestHandler configHandler;
    3232
    3333    protected String buildChangesetSummary() {
  • trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java

    r7005 r8308  
    194194
    195195    static class OsmPrimitiveListModel extends AbstractListModel<OsmPrimitive> {
    196         private List<OsmPrimitive> data;
     196        private transient List<OsmPrimitive> data;
    197197
    198198        public OsmPrimitiveListModel() {
  • trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java

    r7801 r8308  
    5151    private static final Color BG_COLOR_ERROR = new Color(255,224,224);
    5252
    53     private Map<UploadStrategy, JRadioButton> rbStrategy;
    54     private Map<UploadStrategy, JLabel> lblNumRequests;
    55     private Map<UploadStrategy, JMultilineLabel> lblStrategies;
     53    private transient Map<UploadStrategy, JRadioButton> rbStrategy;
     54    private transient Map<UploadStrategy, JLabel> lblNumRequests;
     55    private transient Map<UploadStrategy, JMultilineLabel> lblStrategies;
    5656    private JosmTextField tfChunkSize;
    5757    private JPanel pnlMultiChangesetPolicyPanel;
  • trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java

    r7005 r8308  
    155155     */
    156156    static class PrimitiveListModel extends AbstractListModel<OsmPrimitive> {
    157         private List<OsmPrimitive> primitives;
     157        private transient List<OsmPrimitive> primitives;
    158158
    159159        public PrimitiveListModel() {
  • trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java

    r8285 r8308  
    2323
    2424public class CustomizeColor extends AbstractAction implements LayerAction, MultiLayerAction {
    25     private List<Layer> layers;
     25    private transient List<Layer> layers;
    2626
    2727    public CustomizeColor(List<Layer> l) {
  • trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java

    r7463 r8308  
    159159
    160160    class ApplyOffsetAction extends AbstractAction {
    161         private OffsetBookmark b;
     161        private transient OffsetBookmark b;
    162162        ApplyOffsetAction(OffsetBookmark b) {
    163163            super(b.name);
  • trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java

    r8126 r8308  
    4444    private abstract static class JumpToMarker extends AbstractAction implements MultikeyShortcutAction {
    4545
    46         private final Layer layer;
    47         private final Shortcut multikeyShortcut;
    48         private WeakReference<Layer> lastLayer;
     46        private final transient Layer layer;
     47        private final transient Shortcut multikeyShortcut;
     48        private transient WeakReference<Layer> lastLayer;
    4949
    5050        public JumpToMarker(JumpToMarkerLayer layer, Shortcut shortcut) {
  • trunk/src/org/openstreetmap/josm/gui/layer/Layer.java

    r7358 r8308  
    380380     */
    381381    public static class LayerSaveAction extends AbstractAction {
    382         private Layer layer;
     382        private final transient Layer layer;
    383383        public LayerSaveAction(Layer layer) {
    384384            putValue(SMALL_ICON, ImageProvider.get("save"));
     
    396396
    397397    public static class LayerSaveAsAction extends AbstractAction {
    398         private Layer layer;
     398        private final transient Layer layer;
    399399        public LayerSaveAsAction(Layer layer) {
    400400            putValue(SMALL_ICON, ImageProvider.get("save_as"));
     
    412412
    413413    public static class LayerGpxExportAction extends AbstractAction {
    414         private Layer layer;
     414        private final transient Layer layer;
    415415        public LayerGpxExportAction(Layer layer) {
    416416            putValue(SMALL_ICON, ImageProvider.get("exportgpx"));
  • trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java

    r8068 r8308  
    128128    protected boolean autoResolutionEnabled = PROP_DEFAULT_AUTOZOOM.get();
    129129    protected boolean settingsChanged;
    130     public WmsCache cache;
    131     private AttributionSupport attribution = new AttributionSupport();
     130    public transient WmsCache cache;
     131    private transient AttributionSupport attribution = new AttributionSupport();
    132132
    133133    // Image index boundary for current view
     
    140140
    141141    // Request queue
    142     private final List<WMSRequest> requestQueue = new ArrayList<>();
    143     private final List<WMSRequest> finishedRequests = new ArrayList<>();
     142    private final transient List<WMSRequest> requestQueue = new ArrayList<>();
     143    private final transient List<WMSRequest> finishedRequests = new ArrayList<>();
    144144    /**
    145145     * List of request currently being processed by download threads
    146146     */
    147     private final List<WMSRequest> processingRequests = new ArrayList<>();
    148     private final Lock requestQueueLock = new ReentrantLock();
    149     private final Condition queueEmpty = requestQueueLock.newCondition();
    150     private final List<WMSGrabber> grabbers = new ArrayList<>();
    151     private final List<Thread> grabberThreads = new ArrayList<>();
     147    private final transient List<WMSRequest> processingRequests = new ArrayList<>();
     148    private final transient Lock requestQueueLock = new ReentrantLock();
     149    private final transient Condition queueEmpty = requestQueueLock.newCondition();
     150    private final transient List<WMSGrabber> grabbers = new ArrayList<>();
     151    private final transient List<Thread> grabberThreads = new ArrayList<>();
    152152    private boolean canceled;
    153153
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r8285 r8308  
    9191    private static List<GpxData> loadedGpxData = new ArrayList<>();
    9292
    93     private GeoImageLayer yLayer = null;
     93    private transient GeoImageLayer yLayer = null;
    9494    private double timezone;
    9595    private long delta;
     
    122122
    123123    private ExtendedDialog syncDialog;
    124     private List<GpxDataWrapper> gpxLst = new ArrayList<>();
     124    private transient List<GpxDataWrapper> gpxLst = new ArrayList<>();
    125125    private JPanel outerPanel;
    126126    private JosmComboBox<GpxDataWrapper> cbGpx;
     
    764764    }
    765765
    766     private StatusBarUpdater statusBarUpdater = new StatusBarUpdater(false);
    767     private StatusBarUpdater statusBarUpdaterWithRepaint = new StatusBarUpdater(true);
     766    private transient StatusBarUpdater statusBarUpdater = new StatusBarUpdater(false);
     767    private transient StatusBarUpdater statusBarUpdaterWithRepaint = new StatusBarUpdater(true);
    768768
    769769    private class StatusBarUpdater implements  DocumentListener, ItemListener, ActionListener {
     
    835835    }
    836836
    837     private RepaintTheMapListener repaintTheMap = new RepaintTheMapListener();
     837    private transient RepaintTheMapListener repaintTheMap = new RepaintTheMapListener();
    838838    private class RepaintTheMapListener implements FocusListener {
    839839        @Override
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java

    r8285 r8308  
    3535
    3636    /** The image currently displayed */
    37     private Image image = null;
     37    private transient Image image = null;
    3838
    3939    /** The image currently displayed */
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java

    r8126 r8308  
    274274    }
    275275
    276     private GeoImageLayer currentLayer = null;
    277     private ImageEntry currentEntry = null;
     276    private transient GeoImageLayer currentLayer = null;
     277    private transient ImageEntry currentEntry = null;
    278278
    279279    public void displayImage(GeoImageLayer layer, ImageEntry entry) {
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ShowThumbnailAction.java

    r7954 r8308  
    77import java.awt.event.ActionEvent;
    88import java.util.List;
     9
    910import javax.swing.AbstractAction;
    1011import javax.swing.JCheckBoxMenuItem;
     
    2122public class ShowThumbnailAction extends AbstractAction implements LayerAction {
    2223
    23     private final GeoImageLayer layer;
     24    private final transient GeoImageLayer layer;
    2425
    2526    /**
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java

    r8285 r8308  
    1313import java.awt.event.MouseEvent;
    1414import java.awt.event.MouseListener;
     15import java.io.Serializable;
    1516import java.util.Arrays;
    1617import java.util.Comparator;
     
    4748 */
    4849public class ChooseTrackVisibilityAction extends AbstractAction {
    49     private final GpxLayer layer;
     50    private final transient GpxLayer layer;
    5051
    5152    private DateFilterPanel dateFilter;
     
    8990     * Comparator for TrackLength objects
    9091     */
    91     private static final class LengthContentComparator implements Comparator<TrackLength> {
     92    private static final class LengthContentComparator implements Comparator<TrackLength>, Serializable {
     93
     94        private static final long serialVersionUID = 1L;
    9295
    9396        /**
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java

    r7937 r8308  
    3232
    3333public class ConvertToDataLayerAction extends AbstractAction {
    34     private final GpxLayer layer;
     34    private final transient GpxLayer layer;
    3535
    3636    public ConvertToDataLayerAction(final GpxLayer layer) {
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/CustomizeDrawingAction.java

    r8285 r8308  
    2929
    3030public class CustomizeDrawingAction extends AbstractAction implements LayerAction, MultiLayerAction {
    31     private List<Layer> layers;
     31    private transient List<Layer> layers;
    3232
    3333    public CustomizeDrawingAction(List<Layer> l) {
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DateFilterPanel.java

    r8285 r8308  
    2626    private DateEditorWithSlider dateTo = new DateEditorWithSlider(tr("To"));
    2727    private JCheckBox noTimestampCb  = new JCheckBox(tr("No timestamp"));
    28     private GpxLayer layer;
     28    private transient GpxLayer layer;
    2929
    30     private ActionListener filterAppliedListener;
     30    private transient ActionListener filterAppliedListener;
    3131
    3232    private final String PREF_DATE_0;
     
    6767    }
    6868
    69     private ChangeListener changeListener = new ChangeListener() {
     69    private transient ChangeListener changeListener = new ChangeListener() {
    7070        @Override public void stateChanged(ChangeEvent e) {
    7171            if (isEnabled()) applyFilterWithDelay();
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackAction.java

    r8285 r8308  
    3737    private static final String PREF_DOWNLOAD_ALONG_TRACK_NEAR = "downloadAlongTrack.near";
    3838
    39     private final GpxData data;
     39    private final transient GpxData data;
    4040
    4141    /**
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackAction.java

    r7937 r8308  
    3737public class DownloadWmsAlongTrackAction extends AbstractAction {
    3838
    39     private final GpxData data;
     39    private final transient GpxData data;
    4040
    4141    public DownloadWmsAlongTrackAction(final GpxData data) {
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java

    r7937 r8308  
    4040 */
    4141public class ImportAudioAction extends AbstractAction {
    42     private final GpxLayer layer;
     42    private final transient GpxLayer layer;
    4343
    4444    private static class Markers {
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java

    r7937 r8308  
    2424
    2525public class ImportImagesAction extends AbstractAction {
    26     private final GpxLayer layer;
     26    private final transient GpxLayer layer;
    2727
    2828    public ImportImagesAction(final GpxLayer layer) {
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/MarkersFromNamedPointsAction.java

    r7937 r8308  
    1919
    2020public class MarkersFromNamedPointsAction extends AbstractAction {
    21     private final GpxLayer layer;
     21    private final transient GpxLayer layer;
    2222
    2323    public MarkersFromNamedPointsAction(final GpxLayer layer) {
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java

    r7518 r8308  
    468468
    469469    public static final class ShowHideMarkerText extends AbstractAction implements LayerAction {
    470         private final MarkerLayer layer;
     470        private final transient MarkerLayer layer;
    471471
    472472        public ShowHideMarkerText(MarkerLayer layer) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java

    r8097 r8308  
    3030    private static class MapPaintAction extends JosmAction {
    3131
    32         private StyleSource style;
     32        private transient StyleSource style;
    3333        private JCheckBoxMenuItem button;
    3434
     
    7878        }
    7979    }
    80     private final Map<String, MapPaintAction> actions = new HashMap<>();
     80    private final transient Map<String, MapPaintAction> actions = new HashMap<>();
    8181
    8282    /**
  • trunk/src/org/openstreetmap/josm/gui/oauth/AbstractAuthorizationUI.java

    r8291 r8308  
    77import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
    88import org.openstreetmap.josm.tools.CheckParameterUtil;
     9
     10import com.sun.org.apache.xerces.internal.utils.Objects;
    911
    1012/**
     
    2123    private String apiUrl;
    2224    private final AdvancedOAuthPropertiesPanel pnlAdvancedProperties;
    23     private OAuthToken accessToken;
     25    private transient OAuthToken accessToken;
    2426
    2527    protected void fireAccessTokenChanged(OAuthToken oldValue, OAuthToken newValue) {
     
    99101        } else if (oldValue == null && this.accessToken == null) {
    100102            // no change - don't fire an event
    101         } else if (! oldValue.equals(this.accessToken)) {
     103        } else if (!Objects.equals(oldValue, this.accessToken)) {
    102104            fireAccessTokenChanged(oldValue, this.accessToken);
    103105        }
  • trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java

    r8291 r8308  
    4848    private JosmTextField tfAccessTokenURL;
    4949    private JosmTextField tfAuthoriseURL;
    50     private UseDefaultItemListener ilUseDefault;
     50    private transient UseDefaultItemListener ilUseDefault;
    5151    private String apiUrl;
    5252
  • trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java

    r7771 r8308  
    6060    private JosmTextField tfUserName;
    6161    private JosmPasswordField tfPassword;
    62     private UserNameValidator valUserName;
    63     private PasswordValidator valPassword;
     62    private transient UserNameValidator valUserName;
     63    private transient PasswordValidator valPassword;
    6464    private AccessTokenInfoPanel pnlAccessTokenInfo;
    6565    private OsmPrivilegesPanel pnlOsmPrivileges;
  • trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java

    r8291 r8308  
    4242
    4343    private JosmTextField tfAccessTokenKey;
    44     private AccessTokenKeyValidator valAccessTokenKey;
     44    private transient AccessTokenKeyValidator valAccessTokenKey;
    4545    private JosmTextField tfAccessTokenSecret;
    46     private AccessTokenSecretValidator valAccessTokenSecret;
     46    private transient AccessTokenSecretValidator valAccessTokenSecret;
    4747    private JCheckBox cbSaveToPreferences;
    4848    private HtmlPanel pnlMessage;
  • trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java

    r8291 r8308  
    333333
    334334    class AcceptAccessTokenAction extends AbstractAction implements PropertyChangeListener {
    335         private OAuthToken token;
     335        private transient OAuthToken token;
    336336
    337337        public AcceptAccessTokenAction() {
  • trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java

    r6890 r8308  
    2828import org.openstreetmap.josm.gui.widgets.HtmlPanel;
    2929import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
     30import org.openstreetmap.josm.gui.widgets.JosmTextField;
    3031import org.openstreetmap.josm.tools.ImageProvider;
    3132import org.openstreetmap.josm.tools.OpenBrowser;
    32 import org.openstreetmap.josm.gui.widgets.JosmTextField;
    3333
    3434/**
     
    4242public class SemiAutomaticAuthorizationUI extends AbstractAuthorizationUI {
    4343    private AccessTokenInfoPanel pnlAccessTokenInfo;
    44     private OAuthToken requestToken;
     44    private transient OAuthToken requestToken;
    4545
    4646    private RetrieveRequestTokenPanel pnlRetrieveRequestToken;
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r8285 r8308  
    9292
    9393    public static final class PreferencePanel extends JPanel implements PreferenceTab {
    94         private final TabPreferenceSetting preferenceSetting;
     94        private final transient TabPreferenceSetting preferenceSetting;
    9595
    9696        private PreferencePanel(TabPreferenceSetting preferenceSetting) {
     
    122122
    123123    public static final class PreferenceScrollPane extends JScrollPane implements PreferenceTab {
    124         private final TabPreferenceSetting preferenceSetting;
     124        private final transient TabPreferenceSetting preferenceSetting;
    125125
    126126        private PreferenceScrollPane(Component view, TabPreferenceSetting preferenceSetting) {
     
    145145
    146146    // all created tabs
    147     private final List<PreferenceTab> tabs = new ArrayList<>();
     147    private final transient List<PreferenceTab> tabs = new ArrayList<>();
    148148    private static final Collection<PreferenceSettingFactory> settingsFactories = new LinkedList<>();
    149149    private static final PreferenceSettingFactory advancedPreferenceFactory = new AdvancedPreference.Factory();
    150     private final List<PreferenceSetting> settings = new ArrayList<>();
     150    private final transient List<PreferenceSetting> settings = new ArrayList<>();
    151151
    152152    // distinct list of tabs that have been initialized (we do not initialize tabs until they are displayed to speed up dialog startup)
    153     private final List<PreferenceSetting> settingsInitialized = new ArrayList<>();
    154 
    155     final List<ValidationListener> validationListeners = new ArrayList<>();
     153    private final transient List<PreferenceSetting> settingsInitialized = new ArrayList<>();
     154
     155    final transient List<ValidationListener> validationListeners = new ArrayList<>();
    156156
    157157    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java

    r8285 r8308  
    111111    protected final AvailableSourcesListModel availableSourcesModel;
    112112    protected final String availableSourcesUrl;
    113     protected final List<SourceProvider> sourceProviders;
     113    protected final transient List<SourceProvider> sourceProviders;
    114114
    115115    protected JTable tblIconPaths;
     
    447447
    448448    protected static class AvailableSourcesListModel extends DefaultListModel<ExtendedSourceEntry> {
    449         private List<ExtendedSourceEntry> data;
     449        private transient List<ExtendedSourceEntry> data;
    450450        private DefaultListSelectionModel selectionModel;
    451451
     
    499499
    500500    protected class ActiveSourcesModel extends AbstractTableModel {
    501         private List<SourceEntry> data;
     501        private transient List<SourceEntry> data;
    502502        private DefaultListSelectionModel selectionModel;
    503503
     
    10371037    class ReloadSourcesAction extends AbstractAction {
    10381038        private final String url;
    1039         private final List<SourceProvider> sourceProviders;
     1039        private final transient List<SourceProvider> sourceProviders;
    10401040        public ReloadSourcesAction(String url, List<SourceProvider> sourceProviders) {
    10411041            putValue(NAME, tr("Reload"));
     
    10551055
    10561056    protected static class IconPathTableModel extends AbstractTableModel {
    1057         private List<String> data;
     1057        private transient List<String> data;
    10581058        private DefaultListSelectionModel selectionModel;
    10591059
     
    12401240    class SourceLoader extends PleaseWaitRunnable {
    12411241        private final String url;
    1242         private final List<SourceProvider> sourceProviders;
     1242        private final transient List<SourceProvider> sourceProviders;
    12431243        private BufferedReader reader;
    12441244        private boolean canceled;
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r8285 r8308  
    313313    private static class ActionParametersTableModel extends AbstractTableModel {
    314314
    315         private ActionDefinition currentAction = ActionDefinition.getSeparator();
     315        private transient ActionDefinition currentAction = ActionDefinition.getSeparator();
    316316
    317317        @Override
     
    393393
    394394    private class ToolbarPopupMenu extends JPopupMenu  {
    395         private ActionDefinition act;
     395        private transient ActionDefinition act;
    396396
    397397        private void setActionAndAdapt(ActionDefinition action) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java

    r8285 r8308  
    357357            public void menuSelected(MenuEvent me) {
    358358                p.removeAll();
    359                 for (File f: new File(".").listFiles()) {
    360                    String s = f.getName();
    361                    int idx = s.indexOf('_');
    362                    if (idx>=0) {
    363                         String t=s.substring(0,idx);
    364                         if (profileTypes.containsKey(t)) {
    365                             p.add(new ImportProfileAction(s, f, t));
    366                         }
    367                    }
    368                 }
    369                 for (File f: Main.pref.getPreferencesDirectory().listFiles()) {
    370                    String s = f.getName();
    371                    int idx = s.indexOf('_');
    372                    if (idx>=0) {
    373                         String t=s.substring(0,idx);
    374                         if (profileTypes.containsKey(t)) {
    375                             p.add(new ImportProfileAction(s, f, t));
    376                         }
    377                    }
    378                 }
    379             }
    380             @Override public void menuDeselected(MenuEvent me) { }
    381             @Override public void menuCanceled(MenuEvent me) { }
     359                File[] files = new File(".").listFiles();
     360                if (files != null) {
     361                    for (File f: files) {
     362                       String s = f.getName();
     363                       int idx = s.indexOf('_');
     364                       if (idx>=0) {
     365                            String t=s.substring(0,idx);
     366                            if (profileTypes.containsKey(t)) {
     367                                p.add(new ImportProfileAction(s, f, t));
     368                            }
     369                       }
     370                    }
     371                }
     372                files = Main.pref.getPreferencesDirectory().listFiles();
     373                if (files != null) {
     374                    for (File f: files) {
     375                       String s = f.getName();
     376                       int idx = s.indexOf('_');
     377                       if (idx>=0) {
     378                            String t=s.substring(0,idx);
     379                            if (profileTypes.containsKey(t)) {
     380                                p.add(new ImportProfileAction(s, f, t));
     381                            }
     382                       }
     383                    }
     384                }
     385            }
     386            @Override
     387            public void menuDeselected(MenuEvent me) {
     388                // Not implemented
     389            }
     390            @Override
     391            public void menuCanceled(MenuEvent me) {
     392                // Not implemented
     393            }
    382394        });
    383395        return p;
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java

    r7937 r8308  
    2828    private final String prefPattern;
    2929    private final String schemaKey;
    30     private final Preferences prefs;
     30    private final transient Preferences prefs;
    3131
    3232    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListEditor.java

    r8285 r8308  
    3030public class ListEditor extends ExtendedDialog {
    3131
    32     private List<String> data;
    33     private PrefEntry entry;
     32    private transient List<String> data;
     33    private transient PrefEntry entry;
    3434
    3535    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListListEditor.java

    r8285 r8308  
    3939
    4040    private EntryListModel entryModel;
    41     private List<List<String>> data;
    42     private PrefEntry entry;
     41    private transient List<List<String>> data;
     42    private transient PrefEntry entry;
    4343
    4444    private JList<String> entryList;
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java

    r8285 r8308  
    4343
    4444    private EntryListModel entryModel;
    45     private PrefEntry entry;
     45    private transient PrefEntry entry;
    4646
    4747    private JList<String> entryList;
     
    4949    private MapTableModel tableModel;
    5050
    51     private List<List<String>> dataKeys;
    52     private List<List<String>> dataValues;
     51    private transient List<List<String>> dataKeys;
     52    private transient List<List<String>> dataValues;
    5353    private Integer entryIdx;
    5454
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java

    r7937 r8308  
    4343public class PreferencesTable extends JTable {
    4444    private AllSettingsTableModel model;
    45     private final List<PrefEntry> displayData;
     45    private final transient List<PrefEntry> displayData;
    4646
    4747    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/StringEditor.java

    r8285 r8308  
    2020public class StringEditor extends ExtendedDialog {
    2121
    22     private PrefEntry entry;
     22    private transient PrefEntry entry;
    2323    private JosmTextField tvalue;
    2424
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java

    r7937 r8308  
    4848    private JRadioButton drawRawGpsLinesLocal = new JRadioButton(tr("Local files"));
    4949    private JRadioButton drawRawGpsLinesNone = new JRadioButton(tr("None"));
    50     private ActionListener drawRawGpsLinesActionListener;
     50    private transient ActionListener drawRawGpsLinesActionListener;
    5151    private JosmTextField drawRawGpsMaxLineLength = new JosmTextField(8);
    5252    private JosmTextField drawRawGpsMaxLineLengthLocal = new JosmTextField(8);
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java

    r8232 r8308  
    7777
    7878    private static class LanguageComboBoxModel extends DefaultComboBoxModel<Locale> {
    79         private final List<Locale> data = new ArrayList<>();
     79        private final transient List<Locale> data = new ArrayList<>();
    8080
    8181        public LanguageComboBoxModel(){
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java

    r7937 r8308  
    3030    protected final JosmTextField name = new JosmTextField();
    3131
    32     protected final Collection<ContentValidationListener> listeners = new ArrayList<>();
     32    protected final transient Collection<ContentValidationListener> listeners = new ArrayList<>();
    3333
    3434    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java

    r7937 r8308  
    2323    private final JosmTextField tmsZoom = new JosmTextField();
    2424    private final JosmTextArea tmsUrl = new JosmTextArea(3, 40);
    25     private final KeyAdapter keyAdapter = new KeyAdapter() {
     25    private final transient KeyAdapter keyAdapter = new KeyAdapter() {
    2626        @Override
    2727        public void keyReleased(KeyEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java

    r7312 r8308  
    3636public class AddWMSLayerPanel extends AddImageryPanel {
    3737
    38     private final WMSImagery wms = new WMSImagery();
     38    private final transient WMSImagery wms = new WMSImagery();
    3939    private final JCheckBox endpoint = new JCheckBox(tr("Store WMS endpoint only, select layers at usage"));
    40     private final WMSLayerTree tree = new WMSLayerTree();
     40    private final transient WMSLayerTree tree = new WMSLayerTree();
    4141    private final JComboBox<String> formats = new JComboBox<>();
    4242    private final JLabel wmsInstruction;
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java

    r8285 r8308  
    205205        public final JTable defaultTable;
    206206        /** The selection listener synchronizing map display with table of default providers **/
    207         private final DefListSelectionListener defaultTableListener;
     207        private final transient DefListSelectionListener defaultTableListener;
    208208        /** The map displaying imagery bounds of selected default providers **/
    209209        public final JMapViewer defaultMap;
     
    225225        // Private members
    226226        private final PreferenceTabbedPane gui;
    227         private final ImageryLayerInfo layerInfo;
     227        private final transient ImageryLayerInfo layerInfo;
    228228
    229229        /**
     
    233233        private static class ImageryURLTableCellRenderer extends DefaultTableCellRenderer {
    234234
    235             private List<ImageryInfo> layers;
     235            private transient List<ImageryInfo> layers;
    236236
    237237            public ImageryURLTableCellRenderer(List<ImageryInfo> layers) {
     
    792792
    793793    static class OffsetBookmarksPanel extends JPanel {
    794         private List<OffsetBookmark> bookmarks = OffsetBookmark.allBookmarks;
     794        private transient List<OffsetBookmark> bookmarks = OffsetBookmark.allBookmarks;
    795795        private OffsetsBookmarksModel model = new OffsetsBookmarksModel();
    796796
     797        /**
     798         * Constructs a new {@code OffsetBookmarksPanel}.
     799         */
    797800        public OffsetBookmarksPanel(final PreferenceTabbedPane gui) {
    798801            super(new GridBagLayout());
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java

    r7005 r8308  
    3838 */
    3939public class PluginListPanel extends VerticallyScrollablePanel {
    40     private PluginPreferencesModel model;
     40    private transient PluginPreferencesModel model;
    4141
    4242    /**
     
    110110     */
    111111    private class JPluginCheckBox extends JCheckBox {
    112         public final PluginInformation pi;
     112        public final transient PluginInformation pi;
    113113        public JPluginCheckBox(final PluginInformation pi, boolean selected) {
    114114            this.pi = pi;
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java

    r7005 r8308  
    2020import org.openstreetmap.josm.Main;
    2121import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
     22import org.openstreetmap.josm.gui.widgets.JosmTextField;
    2223import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator;
    2324import org.openstreetmap.josm.plugins.PluginHandler;
    24 import org.openstreetmap.josm.gui.widgets.JosmTextField;
    2525
    2626/**
     
    5555    }
    5656
    57     private Map<Policy, JRadioButton> rbVersionBasedUpatePolicy;
    58     private Map<Policy, JRadioButton> rbTimeBasedUpatePolicy;
     57    private transient Map<Policy, JRadioButton> rbVersionBasedUpatePolicy;
     58    private transient Map<Policy, JRadioButton> rbTimeBasedUpatePolicy;
    5959    private JosmTextField tfUpdateInterval;
    6060    private JLabel lblUpdateInterval;
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java

    r8285 r8308  
    77import java.awt.GridBagLayout;
    88import java.awt.event.ActionListener;
     9import java.io.Serializable;
    910import java.util.ArrayList;
    1011import java.util.Collection;
     
    4849        private ProjectionCodeListModel model;
    4950        public JList<String> selectionList;
    50         private List<String> data;
    51         private List<String> filteredData;
     51        private transient List<String> data;
     52        private transient List<String> filteredData;
    5253        private static final String DEFAULT_CODE = "EPSG:3857";
    5354        private String lastCode = DEFAULT_CODE;
    54         private ActionListener listener;
     55        private transient ActionListener listener;
    5556
    5657        public CodeSelectionPanel(String initialCode, ActionListener listener) {
     
    6768         * Comparator that compares the number part of the code numerically.
    6869         */
    69         private static class CodeComparator implements Comparator<String> {
     70        private static class CodeComparator implements Comparator<String>, Serializable {
     71            private static final long serialVersionUID = 1L;
    7072            private final Pattern codePattern = Pattern.compile("([a-zA-Z]+):(\\d+)");
    7173            @Override
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java

    r8291 r8308  
    5050    private JLabel lblApiUrl;
    5151    private JosmTextField tfOsmServerUrl;
    52     private ApiUrlValidator valOsmServerUrl;
     52    private transient ApiUrlValidator valOsmServerUrl;
    5353    private SideButton btnTest;
    5454    /** indicates whether to use the default OSM URL or not */
    5555    private JCheckBox cbUseDefaultServerUrl;
    5656
    57     private ApiUrlPropagator propagator;
     57    private transient ApiUrlPropagator propagator;
    5858
    5959    protected JComponent buildDefaultServerUrlPanel() {
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java

    r7005 r8308  
    100100    public static final String PROXY_EXCEPTIONS = "proxy.exceptions";
    101101
    102     private Map<ProxyPolicy, JRadioButton> rbProxyPolicy;
     102    private transient Map<ProxyPolicy, JRadioButton> rbProxyPolicy;
    103103    private JosmTextField tfProxyHttpHost;
    104104    private JosmTextField tfProxyHttpPort;
  • trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java

    r8285 r8308  
    119119    private static class ScListModel extends AbstractTableModel {
    120120        private String[] columnNames = new String[]{tr("Action"), tr("Shortcut")};
    121         private List<Shortcut> data;
     121        private transient List<Shortcut> data;
    122122
    123123        public ScListModel() {
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagCellEditor.java

    r8005 r8308  
    1717 *
    1818 */
    19 @SuppressWarnings("serial")
    2019public class TagCellEditor extends AbstractCellEditor implements TableCellEditor{
    2120
    2221    protected AutoCompletingTextField editor = null;
    23     protected TagModel currentTag = null;
     22    protected transient TagModel currentTag = null;
    2423
    2524    /** the cache of auto completion items derived from the current JOSM data set */
    26     protected AutoCompletionManager autocomplete = null;
     25    protected transient AutoCompletionManager autocomplete = null;
    2726
    2827    /** user input is matched against this list of auto completion items */
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java

    r8291 r8308  
    3636
    3737    /** the list holding the tags */
    38     protected final List<TagModel> tags =new ArrayList<>();
     38    protected final transient List<TagModel> tags =new ArrayList<>();
    3939
    4040    /** indicates whether the model is dirty */
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java

    r8291 r8308  
    3939
    4040    private PresetListPanel presetListPanel;
    41     private final PresetHandler presetHandler;
     41    private final transient PresetHandler presetHandler;
    4242
    4343    /**
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java

    r8285 r8308  
    6565     */
    6666    private final CopyOnWriteArrayList<Component> doNotStopCellEditingWhenFocused = new CopyOnWriteArrayList<>();
    67     private CellEditorRemover editorRemover;
     67    private transient CellEditorRemover editorRemover;
    6868
    6969    /**
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java

    r8285 r8308  
    8686     */
    8787    public EnumSet<TaggingPresetType> types;
    88     public List<TaggingPresetItem> data = new LinkedList<>();
    89     public Roles roles;
    90     public TemplateEntry nameTemplate;
    91     public Match nameTemplateFilter;
     88    public transient List<TaggingPresetItem> data = new LinkedList<>();
     89    public transient Roles roles;
     90    public transient TemplateEntry nameTemplate;
     91    public transient Match nameTemplateFilter;
    9292
    9393    /**
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java

    r8285 r8308  
    7676    private final EnumSet<TaggingPresetType> typesInSelection = EnumSet.noneOf(TaggingPresetType.class);
    7777    private boolean typesInSelectionDirty = true;
    78     private final PresetClassifications classifications = new PresetClassifications();
     78    private final transient PresetClassifications classifications = new PresetClassifications();
    7979    private final ResultListModel lsResultModel = new ResultListModel();
    8080
    81     private final List<ListSelectionListener> listSelectionListeners = new ArrayList<>();
    82 
    83     private ActionListener dblClickListener;
    84     private ActionListener clickListener;
     81    private final transient List<ListSelectionListener> listSelectionListeners = new ArrayList<>();
     82
     83    private transient ActionListener dblClickListener;
     84    private transient ActionListener clickListener;
    8585
    8686    private static class ResultListCellRenderer implements ListCellRenderer<TaggingPreset> {
     
    9797    private static class ResultListModel extends AbstractListModel<TaggingPreset> {
    9898
    99         private List<PresetClassification> presets = new ArrayList<>();
     99        private transient List<PresetClassification> presets = new ArrayList<>();
    100100
    101101        public synchronized void setPresets(List<PresetClassification> presets) {
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java

    r8267 r8308  
    242242    /* ------------------------------------------------------------------------------------ */
    243243
    244     private CellEditorSupport tableCellEditorSupport;
     244    private transient CellEditorSupport tableCellEditorSupport;
    245245    private String originalValue;
    246246
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java

    r8291 r8308  
    3333
    3434    /** the bare list of AutoCompletionItems */
    35     private List<AutoCompletionListItem> list = null;
     35    private transient List<AutoCompletionListItem> list = null;
    3636    /**  the filtered list of AutoCompletionItems */
    37     private ArrayList<AutoCompletionListItem> filtered = null;
     37    private transient ArrayList<AutoCompletionListItem> filtered = null;
    3838    /** the filter expression */
    3939    private String filter = null;
    4040    /** map from value to priority */
    41     private Map<String,AutoCompletionListItem> valutToItemMap;
     41    private transient Map<String,AutoCompletionListItem> valutToItemMap;
    4242
    4343    /**
  • trunk/src/org/openstreetmap/josm/gui/widgets/AbstractIdTextField.java

    r7937 r8308  
    1515public abstract class AbstractIdTextField<T extends AbstractTextComponentValidator> extends JosmTextField {
    1616
    17     protected final T validator;
     17    protected final transient T validator;
    1818
    1919    /**
     
    5656     */
    5757    public final void clearTextIfInvalid() {
    58         if (!validator.isValid()) 
     58        if (!validator.isValid())
    5959            setText("");
    6060        validator.validate();
    6161    }
    62    
     62
    6363    /**
    6464     * Reads the id(s).
  • trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java

    r7509 r8308  
    1414    private int maxSize = 10;
    1515
    16     private List<HistoryChangedListener> listeners = new ArrayList<>();
     16    private transient List<HistoryChangedListener> listeners = new ArrayList<>();
    1717
    1818    public ComboBoxHistory(int size) {
  • trunk/src/org/openstreetmap/josm/gui/widgets/DateEditorWithSlider.java

    r7937 r8308  
    3535    private boolean watchSlider = true;
    3636
    37     private List<ChangeListener> listeners = new ArrayList<>();
     37    private transient List<ChangeListener> listeners = new ArrayList<>();
    3838
    3939    /**
  • trunk/src/org/openstreetmap/josm/gui/widgets/DisableShortcutsOnFocusGainedTextField.java

    r8291 r8308  
    9696    }
    9797
    98     private final List<Pair<Action,Shortcut>> unregisteredActionShortcuts = new ArrayList<>();
    99     private final Set<JosmAction> disabledMenuActions = new HashSet<>();
     98    private final transient List<Pair<Action,Shortcut>> unregisteredActionShortcuts = new ArrayList<>();
     99    private final transient Set<JosmAction> disabledMenuActions = new HashSet<>();
    100100
    101101    @Override
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java

    r7864 r8308  
    708708     */
    709709    public static class InvalidLayoutException extends RuntimeException {
    710         private final Node node;
     710        private final transient Node node;
    711711        public InvalidLayoutException (String msg, Node node) {
    712712            super(msg);
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java

    r6986 r8308  
    4747 */
    4848public class MultiSplitPane extends JPanel {
    49     private AccessibleContext accessibleContext = null;
     49    private transient AccessibleContext accessibleContext = null;
    5050    private boolean continuousLayout = true;
    51     private DividerPainter dividerPainter = new DefaultDividerPainter();
     51    private transient DividerPainter dividerPainter = new DefaultDividerPainter();
    5252
    5353    /**
     
    222222
    223223    private boolean dragUnderway = false;
    224     private MultiSplitLayout.Divider dragDivider = null;
     224    private transient MultiSplitLayout.Divider dragDivider = null;
    225225    private Rectangle initialDividerBounds = null;
    226226    private boolean oldFloatingDividers = true;
  • trunk/src/org/openstreetmap/josm/gui/widgets/OsmPrimitivesTable.java

    r7937 r8308  
    1717
    1818public abstract class OsmPrimitivesTable extends JTable {
    19    
     19
    2020    /**
    2121     * the data layer in whose context primitives are edited in this table
    2222     */
    23     private OsmDataLayer layer;
     23    private transient OsmDataLayer layer;
    2424
    2525    /** the popup menu */
     
    4040        addMouseListener(new DblClickHandler());
    4141    }
    42    
     42
    4343    public OsmPrimitivesTableModel getOsmPrimitivesTableModel() {
    4444        return (OsmPrimitivesTableModel) getModel();
     
    5656        return popupMenu;
    5757    }
    58    
     58
    5959    protected abstract ZoomToAction buildZoomToAction();
    6060
     
    6767        return menu;
    6868    }
    69    
     69
    7070    public void unlinkAsListener() {
    7171        MapView.removeLayerChangeListener(zoomToAction);
    7272    }
    73        
     73
    7474    public OsmPrimitive getPrimitiveInLayer(int row, OsmDataLayer layer) {
    7575        return getOsmPrimitivesTableModel().getReferredPrimitive(row);
  • trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java

    r7509 r8308  
    4343    }
    4444
    45     private final QuadStateDecorator model;
     45    private final transient QuadStateDecorator model;
    4646    private State[] allowed;
    4747
  • trunk/src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java

    r8093 r8308  
    5151    protected final UndoManager undo = new UndoManager();
    5252
    53     protected final UndoableEditListener undoEditListener = new UndoableEditListener() {
     53    protected final transient UndoableEditListener undoEditListener = new UndoableEditListener() {
    5454        @Override
    5555        public void undoableEditHappened(UndoableEditEvent e) {
     
    6060    };
    6161
    62     protected final PropertyChangeListener propertyChangeListener = new PropertyChangeListener() {
     62    protected final transient PropertyChangeListener propertyChangeListener = new PropertyChangeListener() {
    6363        @Override
    6464        public void propertyChange(PropertyChangeEvent evt) {
  • trunk/src/org/openstreetmap/josm/io/AbstractParser.java

    r8148 r8308  
    2525 */
    2626public abstract class AbstractParser extends DefaultHandler {
    27    
     27
    2828    /** the current primitive to be read */
    2929    protected HistoryOsmPrimitive currentPrimitive;
     
    3434        this.locator = locator;
    3535    }
    36    
     36
    3737    protected abstract void throwException(String message) throws SAXException;
     38
     39    protected abstract void throwException(String message, Exception e) throws SAXException;
    3840
    3941    protected final long getMandatoryAttributeLong(Attributes attr, String name) throws SAXException {
     
    4648            l = Long.parseLong(v);
    4749        } catch(NumberFormatException e) {
    48             throwException(tr("Illegal value for mandatory attribute ''{0}'' of type long. Got ''{1}''.", name, v));
     50            throwException(tr("Illegal value for mandatory attribute ''{0}'' of type long. Got ''{1}''.", name, v), e);
    4951        }
    5052        if (l < 0) {
     
    6264            l = Long.parseLong(v);
    6365        } catch(NumberFormatException e) {
    64             throwException(tr("Illegal value for mandatory attribute ''{0}'' of type long. Got ''{1}''.", name, v));
     66            throwException(tr("Illegal value for mandatory attribute ''{0}'' of type long. Got ''{1}''.", name, v), e);
    6567        }
    6668        if (l < 0) {
     
    7981            d = Double.parseDouble(v);
    8082        } catch(NumberFormatException e) {
    81             throwException(tr("Illegal value for attribute ''{0}'' of type double. Got ''{1}''.", name, v));
     83            throwException(tr("Illegal value for attribute ''{0}'' of type double. Got ''{1}''.", name, v), e);
    8284        }
    8385        return d;
     
    102104        return false; // not reached
    103105    }
    104    
     106
    105107    protected final HistoryOsmPrimitive createPrimitive(Attributes atts, OsmPrimitiveType type) throws SAXException {
    106108        long id = getMandatoryAttributeLong(atts,"id");
     
    152154        currentPrimitive = createPrimitive(atts, OsmPrimitiveType.WAY);
    153155    }
    154    
     156
    155157    protected final void startRelation(Attributes atts) throws SAXException {
    156158        currentPrimitive = createPrimitive(atts, OsmPrimitiveType.RELATION);
     
    175177            type = OsmPrimitiveType.fromApiTypeName(v);
    176178        } catch(IllegalArgumentException e) {
    177             throwException(tr("Illegal value for mandatory attribute ''{0}'' of type OsmPrimitiveType. Got ''{1}''.", "type", v));
     179            throwException(tr("Illegal value for mandatory attribute ''{0}'' of type OsmPrimitiveType. Got ''{1}''.", "type", v), e);
    178180        }
    179181        String role = getMandatoryAttributeString(atts, "role");
     
    181183        ((HistoryRelation)currentPrimitive).addMember(member);
    182184    }
    183    
     185
    184186    protected final boolean doStartElement(String qName, Attributes atts) throws SAXException {
    185187        switch (qName) {
  • trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java

    r8230 r8308  
    192192         * The downloaded notes
    193193         */
    194         public final List<Note> notes;
     194        public final transient List<Note> notes;
    195195        /**
    196196         * The download limit sent to the server.
  • trunk/src/org/openstreetmap/josm/io/CacheFiles.java

    r7132 r8308  
    248248        long dirsize = 0;
    249249
    250         for(File f : dir.listFiles()) {
    251             if(isExpired(f)) {
    252                 f.delete();
    253             } else {
    254                 dirsize += f.length();
    255                 modtime.put(f.lastModified(), f);
     250        File[] files = dir.listFiles();
     251        if (files != null) {
     252            for(File f : files) {
     253                if(isExpired(f)) {
     254                    f.delete();
     255                } else {
     256                    dirsize += f.length();
     257                    modtime.put(f.lastModified(), f);
     258                }
    256259            }
    257260        }
     
    283286     */
    284287    public void customCleanUp(int type, int size) {
     288        File[] files;
    285289        switch(type) {
    286290        case CLEAN_ALL:
    287             for(File f : dir.listFiles()) {
    288                 f.delete();
     291            files = dir.listFiles();
     292            if (files != null) {
     293                for (File f : files) {
     294                    f.delete();
     295                }
    289296            }
    290297            break;
    291298        case CLEAN_SMALL_FILES:
    292             for(File f: dir.listFiles())
    293                 if(f.length() < size) {
    294                     f.delete();
     299            files = dir.listFiles();
     300            if (files != null) {
     301                for (File f: files) {
     302                    if (f.length() < size) {
     303                        f.delete();
     304                    }
    295305                }
     306            }
    296307            break;
    297308        case CLEAN_BY_DATE:
     
    309320        long dirsize = 0;
    310321
    311         for(File f : this.dir.listFiles()) {
    312             dirsize += f.length();
     322        File[] files = dir.listFiles();
     323        if (files != null) {
     324            for(File f : files) {
     325                dirsize += f.length();
     326            }
    313327        }
    314328        return dirsize;
  • trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java

    r8287 r8308  
    4444        }
    4545
    46         protected void throwException(Exception e) throws XmlParsingException {
    47             throw new XmlParsingException(e).rememberLocation(locator);
     46        @Override
     47        protected void throwException(String message, Exception e) throws XmlParsingException {
     48            throw new XmlParsingException(message, e).rememberLocation(locator);
    4849        }
    4950
     
    103104        @Override
    104105        public void error(SAXParseException e) throws SAXException {
    105             throwException(e);
     106            throwException(null, e);
    106107        }
    107108
    108109        @Override
    109110        public void fatalError(SAXParseException e) throws SAXException {
    110             throwException(e);
     111            throwException(null, e);
    111112        }
    112113    }
  • trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java

    r8287 r8308  
    4949
    5050        @Override
     51        protected void throwException(String message, Exception e) throws SAXException {
     52            throw new SAXException(getCurrentPosition() + message, e);
     53        }
     54
     55        @Override
    5156        public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
    5257            doStartElement(qName, atts);
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSException.java

    r7937 r8308  
    1717public class WMSException extends Exception {
    1818
    19     private final WMSRequest request;
     19    private final transient WMSRequest request;
    2020    private final URL url;
    2121    private final String[] exceptions;
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java

    r8304 r8308  
    4646
    4747    private final JTable propertyTable;
    48     private final Collection<? extends OsmPrimitive> sel;
     48    private final transient Collection<? extends OsmPrimitive> sel;
    4949    private final int[] count;
    5050
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java

    r8221 r8308  
    22package org.openstreetmap.josm.io.remotecontrol.handler;
    33
     4import static org.openstreetmap.josm.tools.I18n.tr;
     5
    46import java.util.Collection;
    57import java.util.HashSet;
    6 import static org.openstreetmap.josm.tools.I18n.tr;
    7 
    88import java.util.LinkedList;
    99import java.util.List;
     
    8080                            }
    8181                        });
     82                        Collection<OsmPrimitive> downlPrim = new HashSet<>();
     83                        for (PrimitiveId id : downloaded) {
     84                            downlPrim.add(ds.getPrimitiveById(id));
     85                        }
     86                        AddTagsDialog.addTags(args, sender, downlPrim);
    8287                    }
    83                     Collection<OsmPrimitive> downlPrim = new HashSet<>();
    84                     for (PrimitiveId id : downloaded) {
    85                         downlPrim.add(ds.getPrimitiveById(id));
    86                     }
    87                     AddTagsDialog.addTags(args, sender, downlPrim);
    8888                    ps.clear();
    8989                }
  • trunk/src/org/openstreetmap/josm/plugins/PluginException.java

    r6380 r8308  
    1212 */
    1313public class PluginException extends Exception {
    14     public final PluginProxy plugin;
     14    public final transient PluginProxy plugin;
    1515    public final String name;
    1616
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r8291 r8308  
    10881088                return name.endsWith(".jar.new");
    10891089            }});
     1090        if (files == null)
     1091            return;
    10901092
    10911093        for (File updatedPlugin : files) {
  • trunk/src/org/openstreetmap/josm/tools/AlphanumComparator.java

    r7937 r8308  
    2323 *
    2424 */
     25import java.io.Serializable;
    2526import java.text.Collator;
    2627import java.util.Comparator;
     
    3839 *
    3940 */
    40 public class AlphanumComparator implements Comparator<String> {
     41public class AlphanumComparator implements Comparator<String>, Serializable {
     42
     43    private static final long serialVersionUID = 1L;
    4144
    4245    private static final AlphanumComparator INSTANCE = new AlphanumComparator();
  • trunk/src/org/openstreetmap/josm/tools/FontsManager.java

    r7402 r8308  
    3939            String url = "resource://data/fonts/"+fontFile;
    4040            try (InputStream i = new CachedFile(url).getInputStream()) {
    41                 Font f = Font.createFont(Font.TRUETYPE_FONT, i);
    42                 if (f == null) {
    43                     throw new RuntimeException("unable to load font: "+fontFile);
    44                 }
    45                 ge.registerFont(f);
     41                ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, i));
    4642            } catch (IOException | FontFormatException ex) {
    4743                throw new RuntimeException(ex);
  • trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java

    r8285 r8308  
    6767    private class MyAction extends AbstractAction {
    6868
    69         private final MultikeyShortcutAction action;
    70         private final Shortcut shortcut;
     69        private final transient MultikeyShortcutAction action;
     70        private final transient Shortcut shortcut;
    7171
    7272        MyAction(MultikeyShortcutAction action) {
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java

    r8099 r8308  
    318318        try (DirectoryStream<Path> ds = Files.newDirectoryStream(fontPath)) {
    319319            for (Path p : ds) {
    320                 fontsAvail.add(p.getFileName().toString().toUpperCase());
     320                Path filename = p.getFileName();
     321                if (filename != null) {
     322                    fontsAvail.add(filename.toString().toUpperCase());
     323                }
    321324            }
    322325            fontsAvail.add(""); // for devanagari
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r8304 r8308  
    378378            Main.warn("Unable to create directory "+out.getPath());
    379379        }
    380         for (File f : in.listFiles()) {
    381             File target = new File(out, f.getName());
    382             if (f.isDirectory()) {
    383                 copyDirectory(f, target);
    384             } else {
    385                 copyFile(f, target);
     380        File[] files = in.listFiles();
     381        if (files != null) {
     382            for (File f : files) {
     383                File target = new File(out, f.getName());
     384                if (f.isDirectory()) {
     385                    copyDirectory(f, target);
     386                } else {
     387                    copyFile(f, target);
     388                }
    386389            }
    387390        }
     
    415418        if( path.exists() ) {
    416419            File[] files = path.listFiles();
    417             for (File file : files) {
    418                 if (file.isDirectory()) {
    419                     deleteDirectory(file);
    420                 } else if (!file.delete()) {
    421                     Main.warn("Unable to delete file: "+file.getPath());
     420            if (files != null) {
     421                for (File file : files) {
     422                    if (file.isDirectory()) {
     423                        deleteDirectory(file);
     424                    } else if (!file.delete()) {
     425                        Main.warn("Unable to delete file: "+file.getPath());
     426                    }
    422427                }
    423428            }
  • trunk/src/org/openstreetmap/josm/tools/template_engine/ParseError.java

    r7937 r8308  
    99public class ParseError extends Exception {
    1010
    11     private final Token unexpectedToken;
     11    private final transient Token unexpectedToken;
    1212
    1313    public ParseError(Token unexpectedToken) {
Note: See TracChangeset for help on using the changeset viewer.