Ignore:
Timestamp:
2015-10-09T02:12:45+02:00 (9 years ago)
Author:
Don-vip
Message:

sonar - squid:S3052 - Fields should not be initialized to default values

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java

    r8742 r8840  
    9494     * know what id it will get.
    9595     */
    96     protected long id = 0;
     96    protected long id;
    9797
    9898    /**
     
    100100     * Never changed by JOSM.
    101101     */
    102     protected User user = null;
     102    protected User user;
    103103
    104104    /**
     
    106106     * ensure update consistency
    107107     */
    108     protected int version = 0;
     108    protected int version;
    109109
    110110    /**
  • trunk/src/org/openstreetmap/josm/data/osm/Changeset.java

    r8512 r8840  
    4646    private boolean incomplete;
    4747    /** the changeset content */
    48     private ChangesetDataSet content = null;
     48    private ChangesetDataSet content;
    4949    /** the changeset discussion */
    50     private List<ChangesetDiscussionComment> discussion = null;
     50    private List<ChangesetDiscussionComment> discussion;
    5151
    5252    /**
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r8512 r8840  
    121121    private int highlightUpdateCount;
    122122
    123     private boolean uploadDiscouraged = false;
     123    private boolean uploadDiscouraged;
    124124
    125125    private final ReadWriteLock lock = new ReentrantReadWriteLock();
  • trunk/src/org/openstreetmap/josm/data/osm/Filter.java

    r8812 r8840  
    1515
    1616    public boolean enable = true;
    17     public boolean hiding = false;
    18     public boolean inverted = false;
     17    public boolean hiding;
     18    public boolean inverted;
    1919
    2020    /**
     
    4848    public static class FilterPreferenceEntry {
    4949        @pref @writeExplicitly public String version = "1";
    50         @pref public String text = null;
     50        @pref public String text;
    5151        @pref @writeExplicitly public String mode = "add";
    52         @pref public boolean case_sensitive = false;
    53         @pref public boolean regex_search = false;
    54         @pref public boolean mapCSS_search = false;
     52        @pref public boolean case_sensitive;
     53        @pref public boolean regex_search;
     54        @pref public boolean mapCSS_search;
    5555        @pref @writeExplicitly public boolean enable = true;
    56         @pref @writeExplicitly public boolean hiding = false;
    57         @pref @writeExplicitly public boolean inverted = false;
     56        @pref @writeExplicitly public boolean hiding;
     57        @pref @writeExplicitly public boolean inverted;
    5858    }
    5959
  • trunk/src/org/openstreetmap/josm/data/osm/NoteData.java

    r8510 r8840  
    2727
    2828    private final Storage<Note> noteList;
    29     private Note selectedNote = null;
     29    private Note selectedNote;
    3030    private Comparator<Note> comparator = DEFAULT_COMPARATOR;
    3131
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r8811 r8840  
    291291     * MAPPAINT
    292292     *--------*/
    293     public StyleCache mappaintStyle = null;
     293    public StyleCache mappaintStyle;
    294294    public int mappaintCacheIdx;
    295295
     
    653653     *--------------------------------------------------*/
    654654
    655     private static volatile Collection<String> workinprogress = null;
    656     private static volatile Collection<String> uninteresting = null;
    657     private static volatile Collection<String> discardable = null;
     655    private static volatile Collection<String> workinprogress;
     656    private static volatile Collection<String> uninteresting;
     657    private static volatile Collection<String> discardable;
    658658
    659659    /**
     
    777777    }
    778778
    779     private static volatile Match directionKeys = null;
    780     private static volatile Match reversedDirectionKeys = null;
     779    private static volatile Match directionKeys;
     780    private static volatile Match reversedDirectionKeys;
    781781
    782782    /**
  • trunk/src/org/openstreetmap/josm/data/osm/Storage.java

    r8510 r8840  
    8989    private int mask;
    9090    private int size;
    91     private volatile int modCount = 0;
     91    private volatile int modCount;
    9292    private double loadFactor = 0.6d;
    9393    private static final int DEFAULT_CAPACITY = 16;
     
    459459    private final class SafeReadonlyIter implements Iterator<T> {
    460460        private final T[] data;
    461         private int slot = 0;
     461        private int slot;
    462462
    463463        SafeReadonlyIter(T[] data) {
     
    491491    private final class Iter implements Iterator<T> {
    492492        private final int mods;
    493         private int slot = 0;
     493        private int slot;
    494494        private int removeSlot = -1;
    495495
  • trunk/src/org/openstreetmap/josm/data/osm/User.java

    r8588 r8840  
    2424public final class User {
    2525
    26     private static long uidCounter = 0;
     26    private static long uidCounter;
    2727
    2828    /**
     
    5959    }
    6060
    61     private static User lastUser = null;
     61    private static User lastUser;
    6262
    6363    /**
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java

    r8510 r8840  
    2323public class BoundingXYVisitor extends AbstractVisitor {
    2424
    25     private ProjectionBounds bounds = null;
     25    private ProjectionBounds bounds;
    2626
    2727    @Override
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java

    r8540 r8840  
    109109
    110110    private final List<Descriptor> descriptors = new ArrayList<>();
    111     private Class<? extends AbstractMapRenderer> activeRenderer = null;
     111    private Class<? extends AbstractMapRenderer> activeRenderer;
    112112
    113113    private MapRendererFactory() {
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java

    r8674 r8840  
    3535    private final Color defaultColor;
    3636
    37     private static volatile Color backgroundColorCache = null;
     37    private static volatile Color backgroundColorCache;
    3838
    3939    private static final MapPaintSylesUpdateListener styleOverrideListener = new MapPaintSylesUpdateListener() {
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r8839 r8840  
    103103        private int idx;
    104104
    105         private Point prev = null;
     105        private Point prev;
    106106        /* 'prev0' is a point that has distance 'offset' from 'prev' and the
    107107         * line from 'prev' to 'prev0' is perpendicular to the way segment from
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java

    r8512 r8840  
    7474
    7575    /** Color cache to draw subsequent segments of same color as one <code>Path</code>. */
    76     protected Color currentColor = null;
     76    protected Color currentColor;
    7777    /** Path store to draw subsequent segments of same color as one <code>Path</code>. */
    7878    protected GeneralPath currentPath = new GeneralPath();
Note: See TracChangeset for help on using the changeset viewer.