Changeset 9830 in josm


Ignore:
Timestamp:
2016-02-19T08:04:01+01:00 (4 years ago)
Author:
wiktorn
Message:

Fix findbugs warning / NPE.

See: #12350

File:
1 edited

Legend:

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

    r9825 r9830  
    628628                this.currentTileMatrixSet = newLayer.tileMatrixSet;
    629629                this.currentLayer = newLayer;
    630             }
    631         }
    632 
     630                Collection<Double> scales = new ArrayList<>(currentTileMatrixSet.tileMatrix.size());
     631                for (TileMatrix tileMatrix : currentTileMatrixSet.tileMatrix) {
     632                    scales.add(tileMatrix.scaleDenominator * 0.28e-03);
     633                }
     634                this.nativeScaleList = new ScaleList(scales);
     635            }
     636        }
    633637        this.crsScale = getTileSize() * 0.28e-03 / proj.getMetersPerUnit();
    634 
    635         Collection<Double> scales = new ArrayList<>(currentTileMatrixSet.tileMatrix.size());
    636         if (currentTileMatrixSet != null) {
    637             for (TileMatrix tileMatrix : currentTileMatrixSet.tileMatrix) {
    638                 scales.add(tileMatrix.scaleDenominator * 0.28e-03);
    639             }
    640         }
    641         this.nativeScaleList = new ScaleList(scales);
    642638    }
    643639
Note: See TracChangeset for help on using the changeset viewer.