[jdk20] RFR: 8301989: new javax.swing.text.DefaultCaret().setBlinkRate(N) results in NPE
Phil Race
prr at openjdk.org
Tue Feb 7 23:10:54 UTC 2023
On Tue, 7 Feb 2023 22:49:55 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.
src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java line 1054:
> 1052: if (rate != 0) {
> 1053: if (component != null && component.isEditable()) {
> 1054: if (flasher == null) {
So later if there is a non-editable component, what happens ?
Some existing logic for that will kick in ?
-------------
PR: https://git.openjdk.org/jdk20/pull/122
More information about the client-libs-dev
mailing list