<Swing Dev> RFR: 6514600: AbstractAction can throw NullPointerException when clone()d
Prasanta Sadhukhan
psadhukhan at openjdk.java.net
Mon Sep 28 07:58:39 UTC 2020
Please review a fix for an issue whereby it is seen that AbstractAction which has had its values clear()ed or nulled
fails to clone and throws NPE. This is because AbstractAction contains an inner class ArrayTable, whose 'table' field
is lazily instantiated, and nulled on clear(), and thus can be null. The clone() method assumes it is not null.
Proposed fix is to add a check for null for "table" field in clone().
-------------
Commit messages:
- JDK-6514600: AbstractAction can throw NullPointerException when clone()d
Changes: https://git.openjdk.java.net/jdk/pull/377/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=377&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-6514600
Stats: 70 lines in 2 files changed: 59 ins; 0 del; 11 mod
Patch: https://git.openjdk.java.net/jdk/pull/377.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/377/head:pull/377
PR: https://git.openjdk.java.net/jdk/pull/377
More information about the swing-dev
mailing list