[jdk20] RFR: 8301989: new javax.swing.text.DefaultCaret().setBlinkRate(N) results in NPE [v2]
    Phil Race 
    prr at openjdk.org
       
    Wed Feb  8 21:42:50 UTC 2023
    
    
  
On Tue, 7 Feb 2023 23:23:24 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
>> Check if the component is associated with the caret before calling methods from it. Added test case that will make sure that will not happen again.
>
> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixe copyright year.
Another question, in the branch where the app calls
setBlinkRate(0)
we have
            if ((component == null || component.isEditable()) && isBlinkRateSaved) {
                savedBlinkRate = 0;
                isBlinkRateSaved = false;
            }
Why do we not clear these unconditionally ?
What is the point of saving it if there's a non-editable component ?
-------------
PR: https://git.openjdk.org/jdk20/pull/122
    
    
More information about the client-libs-dev
mailing list