This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
new cf3453a Bug fix: missing call to SampleDimension.Builder.clear()
before to build a new SampleDimension.
cf3453a is described below
commit cf3453a938cde7974b0e210f4168b48a7a9f0cb5
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Thu Jan 10 16:15:24 2019 +0100
Bug fix: missing call to SampleDimension.Builder.clear() before to build a
new SampleDimension.
---
.../src/main/java/org/apache/sis/storage/netcdf/GridResource.java | 1 +
1 file changed, 1 insertion(+)
diff --git
a/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/GridResource.java
b/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/GridResource.java
index 8c388ee..8f92404 100644
---
a/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/GridResource.java
+++
b/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/GridResource.java
@@ -389,6 +389,7 @@ final class GridResource extends AbstractGridResource
implements ResourceOnFileS
if (def == null) {
if (builder == null) builder = new
SampleDimension.Builder();
ranges[i] = def = createSampleDimension(builder,
variable);
+ builder.clear();
}
if (values == null) {
// Optional.orElseThrow() below should never fail
since Variable.read(…) wraps primitive array.