On Tue, 24 Mar 2026 19:37:37 GMT, Damon Nguyen <[email protected]> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - Some more formatting fix
>>  - Some more formatting fix
>
> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java 
> line 1073:
> 
>> 1071: 
>> 1072:                 JList<?> list = getList();
>> 1073:                 if (list != null && list.getComponentOrientation() != 
>> o) {
> 
> In this same file, there are instances of `for ( ` and `if ( ` where there 
> are spaces after the `(`. Maybe you can correct these too by removing that 
> following space since we're fixing formatting? There's a good number of them 
> though.

And just a few lines above these `if` conditions:


ComponentOrientation o =(ComponentOrientation)e.getNewValue();


Then a few lines below:


                if (o!=getComponentOrientation()) {
                    setComponentOrientation(o);
                }

> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuBarUI.java 
> line 241:
> 
>> 239:         public void stateChanged(ChangeEvent e) {
>> 240:             int i,c;
>> 241:             for(i = 0,c = menuBar.getMenuCount() ; i < c ; i++) {
> 
> Suggestion:
> 
>             for (i = 0, c = menuBar.getMenuCount(); i < c; i++) {

I'd rather declare both `int i` ~~and `int c`~~ in the for-loop itself—it 
aligns to Java-style better.

And move out `final int c = menuBar.getMenuCount();` out of the for-loop.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30310#discussion_r2984129658
PR Review Comment: https://git.openjdk.org/jdk/pull/30310#discussion_r2984159009

Reply via email to