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
Files:
29 edited

Legend:

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

    r8510 r8840  
    321321    }
    322322
    323     private static boolean busy = false;
     323    private static boolean busy;
    324324
    325325    public static void pluginOperation(String install, String uninstall, String delete)  {
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r8836 r8840  
    101101     * @see #getPreferencesDirectory()
    102102     */
    103     private File preferencesDir = null;
     103    private File preferencesDir;
    104104
    105105    /**
    106106     * Internal storage for the cache directory.
    107107     */
    108     private File cacheDir = null;
     108    private File cacheDir;
    109109
    110110    /**
    111111     * Internal storage for the user data directory.
    112112     */
    113     private File userdataDir = null;
     113    private File userdataDir;
    114114
    115115    /**
  • trunk/src/org/openstreetmap/josm/data/cache/BufferedImageCacheEntry.java

    r8624 r8840  
    1717    private static final long serialVersionUID = 1L; //version
    1818    // transient to avoid serialization, volatile to avoid synchronization of whole getImage() method
    19     private transient volatile BufferedImage img = null;
    20     private transient volatile boolean writtenToDisk = false;
     19    private transient volatile BufferedImage img;
     20    private transient volatile boolean writtenToDisk;
    2121    // we need to have separate control variable, to know, if we already tried to load the image, as img might be null
    2222    // after we loaded image, as for example, when image file is malformed (eg. HTML file)
    23     private transient volatile boolean imageLoaded = false;
     23    private transient volatile boolean imageLoaded;
    2424
    2525    /**
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java

    r8659 r8840  
    3838    private static final Logger LOG = FeatureAdapter.getLogger(JCSCacheManager.class.getCanonicalName());
    3939
    40     private static volatile CompositeCacheManager cacheManager = null;
     40    private static volatile CompositeCacheManager cacheManager;
    4141    private static long maxObjectTTL        = -1;
    4242    private static final String PREFERENCE_PREFIX = "jcs.cache";
    4343    private static final AuxiliaryCacheFactory diskCacheFactory = new IndexedDiskCacheFactory();
    44     private static FileLock cacheDirLock = null;
     44    private static FileLock cacheDirLock;
    4545
    4646    /**
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r8800 r8840  
    8989    private ICacheAccess<K, V> cache;
    9090    private ICacheElement<K, V> cacheElement;
    91     protected V cacheData = null;
    92     protected CacheEntryAttributes attributes = null;
     91    protected V cacheData;
     92    protected CacheEntryAttributes attributes;
    9393
    9494    // HTTP connection parameters
     
    9898    private ThreadPoolExecutor downloadJobExecutor;
    9999    private Runnable finishTask;
    100     private boolean force = false;
     100    private boolean force;
    101101
    102102    /**
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java

    r8674 r8840  
    164164    private String langName;
    165165    /** whether this is a entry activated by default or not */
    166     private boolean defaultEntry = false;
     166    private boolean defaultEntry;
    167167    /** The data part of HTTP cookies header in case the service requires cookies to work */
    168     private String cookies = null;
     168    private String cookies;
    169169    /** Whether this service requires a explicit EULA acceptance before it can be activated */
    170     private String eulaAcceptanceRequired = null;
     170    private String eulaAcceptanceRequired;
    171171    /** type of the imagery servics - WMS, TMS, ... */
    172172    private ImageryType imageryType = ImageryType.WMS;
    173     private double pixelPerDegree = 0.0;
     173    private double pixelPerDegree;
    174174    /** maximum zoom level for TMS imagery */
    175     private int defaultMaxZoom = 0;
     175    private int defaultMaxZoom;
    176176    /** minimum zoom level for TMS imagery */
    177     private int defaultMinZoom = 0;
     177    private int defaultMinZoom;
    178178    /** display bounds of imagery, displayed in prefs and used for automatic imagery selection */
    179     private ImageryBounds bounds = null;
     179    private ImageryBounds bounds;
    180180    /** projections supported by WMS servers */
    181181    private List<String> serverProjections;
  • 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();
  • trunk/src/org/openstreetmap/josm/data/projection/AbstractProjection.java

    r8346 r8840  
    2626    protected Datum datum;
    2727    protected Proj proj;
    28     protected double x0 = 0.0;     /* false easting (in meters) */
    29     protected double y0 = 0.0;     /* false northing (in meters) */
    30     protected double lon0 = 0.0;   /* central meridian */
    31     protected double k0 = 1.0;     /* general scale factor */
     28    protected double x0     /* false easting (in meters) */
     29    protected double y0     /* false northing (in meters) */
     30    protected double lon0   /* central meridian */
     31    protected double k0 = 1.0; /* general scale factor */
    3232
    3333    public final Ellipsoid getEllipsoid() {
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java

    r8540 r8840  
    3434    // CHECKSTYLE.ON: LineLength
    3535
    36     private NTV2GridShiftFile instance = null;
     36    private NTV2GridShiftFile instance;
    3737    private String gridFileName;
    3838
  • trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java

    r8510 r8840  
    7373public class OsmValidator implements LayerChangeListener {
    7474
    75     public static volatile ValidatorLayer errorLayer = null;
     75    public static volatile ValidatorLayer errorLayer;
    7676
    7777    /** The validate action */
     
    297297    }
    298298
    299     private static boolean testsInitialized = false;
     299    private static boolean testsInitialized;
    300300
    301301    /**
  • trunk/src/org/openstreetmap/josm/data/validation/TestError.java

    r8633 r8840  
    3333public class TestError implements Comparable<TestError>, DataSetListener {
    3434    /** is this error on the ignore list */
    35     private boolean ignored = false;
     35    private boolean ignored;
    3636    /** Severity */
    3737    private Severity severity;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java

    r8378 r8840  
    3838    private List<Way> coastlines;
    3939
    40     private Area downloadedArea = null;
     40    private Area downloadedArea;
    4141
    4242    /**
  • trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java

    r8540 r8840  
    5858    private static final Set<String> ISO_COUNTRIES = new HashSet<>(Arrays.asList(Locale.getISOCountries()));
    5959
    60     private boolean leftByPedestrians = false;
    61     private boolean leftByCyclists = false;
    62     private boolean leftByCars = false;
    63     private int pedestrianWays = 0;
    64     private int cyclistWays = 0;
    65     private int carsWays = 0;
     60    private boolean leftByPedestrians;
     61    private boolean leftByCyclists;
     62    private boolean leftByCars;
     63    private int pedestrianWays;
     64    private int cyclistWays;
     65    private int carsWays;
    6666
    6767    /**
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r8540 r8840  
    241241        protected final Map<String, Boolean> assertions = new HashMap<>();
    242242        protected final Set<String> setClassExpressions = new HashSet<>();
    243         protected boolean deletion = false;
     243        protected boolean deletion;
    244244
    245245        TagCheck(GroupedMapCSSRule rule) {
  • trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java

    r8836 r8840  
    9595
    9696    private static class RoleInfo {
    97         private int total = 0;
     97        private int total;
    9898    }
    9999
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java

    r8753 r8840  
    9797    public static final String PREF_CHECK_FIXMES_BEFORE_UPLOAD = PREF_CHECK_FIXMES + "BeforeUpload";
    9898
    99     protected boolean checkKeys = false;
    100     protected boolean checkValues = false;
    101     protected boolean checkComplex = false;
    102     protected boolean checkFixmes = false;
     99    protected boolean checkKeys;
     100    protected boolean checkValues;
     101    protected boolean checkComplex;
     102    protected boolean checkFixmes;
    103103
    104104    protected JCheckBox prefCheckKeys;
     
    667667            public Object value;
    668668            public boolean noMatch;
    669             public boolean tagAll = false;
    670             public boolean valueAll = false;
    671             public boolean valueBool = false;
     669            public boolean tagAll;
     670            public boolean valueAll;
     671            public boolean valueBool;
    672672
    673673            private Pattern getPattern(String str) throws PatternSyntaxException {
  • trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java

    r8513 r8840  
    334334    };
    335335
    336     private static volatile Map<String, String> mapNameToValue = null;
     336    private static volatile Map<String, String> mapNameToValue;
    337337
    338338    public String unescape(String str) {
Note: See TracChangeset for help on using the changeset viewer.