Ignore:
Timestamp:
2016-06-01T23:17:40+02:00 (5 years ago)
Author:
Don-vip
Message:

sonar - squid:S1854 - Dead stores should be removed

Location:
trunk/src/org/openstreetmap/josm/data
Files:
7 edited

Legend:

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

    r10212 r10308  
    256256
    257257    private void finishLoading(LoadResult result) {
    258         Set<ICachedLoaderListener> listeners = null;
     258        Set<ICachedLoaderListener> listeners;
    259259        synchronized (inProgress) {
    260260            listeners = inProgress.remove(getUrlNoException().toString());
  • trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java

    r9961 r10308  
    111111        // the target dataset. Create a clone and add it to the target dataset.
    112112        //
    113         OsmPrimitive target = null;
     113        OsmPrimitive target;
    114114        switch(source.getType()) {
    115115        case NODE: target = source.isNew() ? new Node() : new Node(source.getId()); break;
  • trunk/src/org/openstreetmap/josm/data/osm/FilterWorker.java

    r9665 r10308  
    2424     * Apply the filters to the primitives of the data set.
    2525     *
    26      * @param all the collection of primitives for that the filter state should
    27      * be updated
     26     * @param all the collection of primitives for that the filter state should be updated
    2827     * @param filterMatcher the FilterMatcher
    2928     * @return true, if the filter state (normal / disabled / hidden)
     
    3130     */
    3231    public static boolean executeFilters(Collection<OsmPrimitive> all, FilterMatcher filterMatcher) {
    33         boolean changed = false;
     32        boolean changed;
    3433        // first relations, then ways and nodes last; this is required to resolve dependencies
    3534        changed = doExecuteFilters(Utils.filter(all, OsmPrimitive.relationPredicate), filterMatcher);
  • trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java

    r10043 r10308  
    3636                DataSet dataSet = null;
    3737                AbstractDatasetChangedEvent consolidatedEvent = null;
    38                 AbstractDatasetChangedEvent event = null;
     38                AbstractDatasetChangedEvent event;
    3939
    4040                while ((event = eventsInEDT.poll()) != null) {
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Util.java

    r9981 r10308  
    7272     */
    7373    public static float getFloat(byte[] b, boolean bigEndian) {
    74         int i = 0;
     74        int i;
    7575        if (bigEndian) {
    7676            i = getIntBE(b, 0);
     
    8989     */
    9090    public static double getDouble(byte[] b, boolean bigEndian) {
    91         int i = 0;
    92         int j = 0;
     91        int i;
     92        int j;
    9393        if (bigEndian) {
    9494            i = getIntBE(b, 0);
     
    9898            j = getIntLE(b, 0);
    9999        }
    100         long l = ((long) i << 32) |
    101         (j & 0x00000000FFFFFFFFL);
     100        long l = ((long) i << 32) | (j & 0x00000000FFFFFFFFL);
    102101        return Double.longBitsToDouble(l);
    103102    }
  • trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java

    r10001 r10308  
    102102        double lambda = l / alpha;
    103103        double phi = b;
    104         double s = 0;
    105104
    106105        double prevPhi = -1000;
     
    111110                throw new RuntimeException("Two many iterations");
    112111            prevPhi = phi;
    113             s = 1 / alpha * (log(tan(PI / 4 + b / 2)) - k) + ellps.e
     112            double s = 1 / alpha * (log(tan(PI / 4 + b / 2)) - k) + ellps.e
    114113            * log(tan(PI / 4 + asin(ellps.e * sin(phi)) / 2));
    115114            phi = 2 * atan(exp(s)) - PI / 2;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java

    r10043 r10308  
    150150                for (Role role: r.roles) {
    151151                    String key = role.key;
    152                     List<Role> roleGroup = null;
     152                    List<Role> roleGroup;
    153153                    if (allroles.containsKey(key)) {
    154154                        roleGroup = allroles.get(key).roles;
Note: See TracChangeset for help on using the changeset viewer.