kopia lustrzana https://github.com/onthegomap/planetiler
Fix NPE for `OsmReader#estimateMemoryUsageBytes()` (#389)
A `NullPointerException` was thrown when this method was called after calling `close()` (which happens when using the `PrometheusStats` client).pull/390/head
rodzic
9ead458f7f
commit
7f6032b641
|
@ -541,7 +541,7 @@ public class OsmReader implements Closeable, MemoryEstimator.HasEstimate {
|
|||
@Override
|
||||
public long estimateMemoryUsageBytes() {
|
||||
long size = 0;
|
||||
size += waysInMultipolygon.serializedSizeInBytes();
|
||||
size += waysInMultipolygon == null ? 0 : waysInMultipolygon.serializedSizeInBytes();
|
||||
// multipolygonWayGeometries is reported separately
|
||||
size += estimateSize(wayToRelations);
|
||||
size += estimateSize(relationInfo);
|
||||
|
|
Ładowanie…
Reference in New Issue