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/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;
Note: See TracChangeset for help on using the changeset viewer.