sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (Jira)" <>
Subject [jira] [Closed] (SIS-464) DataSet.getEnvelope() should return Optional<Envelope>
Date Sun, 20 Oct 2019 19:09:00 GMT


Martin Desruisseaux closed SIS-464.

> DataSet.getEnvelope() should return Optional<Envelope>
> ------------------------------------------------------
>                 Key: SIS-464
>                 URL:
>             Project: Spatial Information Systems
>          Issue Type: Bug
>          Components: Storage
>    Affects Versions: 0.8
>            Reporter: Martin Desruisseaux
>            Assignee: Martin Desruisseaux
>            Priority: Major
>             Fix For: 1.0
> The {{}} interface contains the following method:
> {code:java}
> Envelope getEnvelope() throws DataStoreException;
> {code}
> It should be:
> {code:java}
> Optional<Envelope> getEnvelope() throws DataStoreException;
> {code}
> The javadoc was saying that this envelope should not be null, but may nevertheless be
null is some circumstances. For example the envelope may be too costly to compute if it would
require to scan all features in a dataset. The danger is that users will assume that the envelope
will never be null for practical purposes, which is a dangerous assumptions. In another project
using SIS, we found that this assumption was one significant cause of {{NullPointerException}}.
We propose to declare the envelope as {{Optional}} for making clear that it may be absent.
> Note that this is an incompatible API changes. We hope that {{DataSet.getEnvelope()}}
is not yet used too widely.

This message was sent by Atlassian Jira

View raw message