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

fix potential NPEs and Sonar issues related to serialization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.