RFR: 6434110: Color constructor parameter name is misleading [v3]
Alexey Ivanov
aivanov at openjdk.org
Fri Feb 20 13:54:40 UTC 2026
On Tue, 17 Feb 2026 20:32:54 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Small cleanup: the parameter names in the Color(int, boolean) constructor have been renamed:
>> - rgba -> argb, since this is the format described in the spec
>> - hasalpha -> hasAlpha, to follow common naming conventions
>>
>> Also adds a basic test for the constructor.
>
> Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision:
>
> lists via "<ul>" is added
Looks good to me, yet I left a few minor comments.
src/java.desktop/share/classes/java/awt/Color.java line 578:
> 576:
> 577: /**
> 578: * Returns the RGB value representing the color in the default sRGB
Should it say **ARGB**? The alpha bits are always included and are valid.
src/java.desktop/share/classes/java/awt/Color.java line 579:
> 577: /**
> 578: * Returns the RGB value representing the color in the default sRGB
> 579: * {@link ColorModel}, consisting of
I think `ColorModel` should be replaced with “color model” because the meaning is literal rather than implies a class name.
-------------
Marked as reviewed by aivanov (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29734#pullrequestreview-3832086779
PR Review Comment: https://git.openjdk.org/jdk/pull/29734#discussion_r2833268472
PR Review Comment: https://git.openjdk.org/jdk/pull/29734#discussion_r2833276558
More information about the client-libs-dev
mailing list