RFR: 8325550: Grammatical error in AnchorPane.setLeftAnchor (and other setters) javadoc
Nir Lisker
nlisker at openjdk.org
Fri Feb 23 22:01:06 UTC 2024
On Fri, 23 Feb 2024 19:38:20 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/layout/AnchorPane.java line 187:
>>
>>> 185: * Returns the child's bottom anchor constraint, if set.
>>> 186: * @param child the child node of an anchor pane
>>> 187: * @return the offset from the bottom of the anchor pane, or {@code null} if no bottom anchor was set
>>
>> minor suggestion: move explanation of when it returns null to the description, i.e.:
>>
>>
>> Returns the child's bottom anchor constraint, if set, otherwise returns {@code null}.
>>
>> @return the offset from the bottom of the anchor pane, or {@code null}
>
> I don't mind either way.
`@return` statements usually state this condition explicitly, like `Map#get`: "the value to which the specified key is mapped, or `null` if this map contains no mapping for the key".
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1379#discussion_r1501214852
More information about the openjfx-dev
mailing list