RFR: 8290353: Clarify the streams returned by ModuleReader::list [v2]

Mark Reinhold mr at openjdk.org
Mon Jul 18 19:52:07 UTC 2022


On Mon, 18 Jul 2022 18:19:48 GMT, Ryan Ernst <duke at openjdk.org> wrote:

>> This commit adds additional clarification to the javadocs of
>> ModuleReader::list about needing to close the stream. The new wording is
>> similar to that used in Files::find and other similar methods.
>
> Ryan Ernst has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - adjust wording
>  - fix uses of list() in java.base

It’s odd to mix adding some advice to the Javadoc with adopting that advice in the code base. Consider opening a new issue and PR for the actual code changes.

Also, a better summary for this issue (and PR) would be “ModuleReader::list specification should suggest closing the returned stream,” since that’s the essence of it.

-------------

PR: https://git.openjdk.org/jdk/pull/9538


More information about the core-libs-dev mailing list