On Wed, 12 Nov 2025 11:53:47 GMT, Alexey Ivanov <[email protected]> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - Code fix only
>>  - Code fix only
>
> src/java.desktop/share/classes/javax/swing/border/BevelBorder.java line 99:
> 
>> 97:     public BevelBorder(int bevelType, Color highlight, Color shadow) {
>> 98:          this(bevelType, (highlight != null) ? highlight.brighter() : 
>> null,
>> 99:               highlight, shadow, (shadow != null) ? shadow.brighter() : 
>> null);
> 
> Suggestion:
> 
>         this(bevelType, (highlight != null) ? highlight.brighter() : null,
>              highlight, shadow, (shadow != null) ? shadow.brighter() : null);
> 
> Fix the indentation.
> 
> In fact, I suggest wrapping the parameters and having highlight and shadow on 
> one line, I think this will improve readability.
> 
> 
> Suggestion:
> 
>         this(bevelType,
>              (highlight != null) ? highlight.brighter() : null, highlight,
>              shadow, (shadow != null) ? shadow.brighter() : null);
> 
> This way both highlight and shadow colors are logically grouped.

ok

> test/jdk/javax/swing/border/TestBevelBorderParam.java line 60:
> 
>> 58:             str.append("BevelBorder constructor throws NPE for null 
>> highlight and shadow");
>> 59:         }
>> 60:         if (failure) {
> 
> You don't need the `failure` variable. If `str` is not empty, throw the 
> exception.

ok

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27949#discussion_r2518107416
PR Review Comment: https://git.openjdk.org/jdk/pull/27949#discussion_r2518107738

Reply via email to