RFR: JDK-8292576: Improve wording of AccessFlag-related specs

Joe Darcy darcy at openjdk.org
Thu Aug 18 18:20:16 UTC 2022


On Thu, 18 Aug 2022 06:56:53 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Spec refinement, including acting on some feedback received for JDK-8266670:
>> 
>> https://github.com/openjdk/jdk/pull/7445#discussion_r906846794
>
> src/java.base/share/classes/java/lang/module/ModuleDescriptor.java line 217:
> 
>> 215:         /**
>> 216:          * {@return an unmodifiable set of the module {@linkplain AccessFlag
>> 217:          * requires flags}, possibly empty}
> 
> The link fix looks okay but the wording in the new accessFlags() method is different to the wording in the other methods. The other methods use "possibly-empty unmodifiable" in the return description. Either is fine but I think we should try to keep the wording consistent where possible.

I've looked over the wording of the various accessFlags methods. The wording for ModuleDescriptor.Requires looks consistent to me:

Returns an unmodifiable set of the module flags, possibly empty.

Returns an unmodifiable set of the module export flags for this module descriptor, possibly empty.

Returns an unmodifiable set of the module opens flags, possibly empty.

Returns an unmodifiable set of the module requires flags, possibly empty.

----

Returns an unmodifiable set of the access flags for this class, possibly empty.

Returns an unmodifiable set of the access flags for the executable represented by this object, possibly empty.

Returns an unmodifiable set of the access flags for this member, possibly empty.

Returns an unmodifiable set of the access flags for the parameter represented by this object, possibly empty.

Am I overlooking something in the twisty passages, all alike?

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

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


More information about the core-libs-dev mailing list