Github user afs commented on the pull request:
https://github.com/apache/jena/pull/133#issuecomment-205982759
For `Model`: it would be unusual (mainly in small examples!) for a model to
be created and closed in the way that scoping for try-with resources tends to
emphasis. Now that model may may be stateless views of datasets, the notion of
"close" is not so clear cut. It certainly does not close the dataset. That is
what I think is being captured in "Not all implementations of Model require
this method to be called."
For `CloseableIterator` is the root of lots of iterator types in Jena, not
just StmtIterator and the otehr API-related iterators. Looks to me if the
javadoc is expressing situations that are not happening in practice anymore.
There was, a long time ago, a BDB backed storage (C-BDB) and that needed
iterator closed so DB cursors were released.
Iterators like `ExtendedIterator<Triple>` get combined, concatenated,
filtered, and mapped and don't fit the `try` block style so well. I added
`AutoCloseable` and got about 700 warnings from the codebase.
So the question must be what impact on everyone's existing applications
will there be? A whole bunch of warnings turning up has to be considered in
deciding here.
Jena supports different APIs over the same core. Maybe creating a more
modern API for model/statement/resource is needed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---