JDK-8258373 : Update the text handling in the JPasswordField
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7,8,11,15,16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-15
  • Updated: 2021-04-12
  • Resolved: 2020-12-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 16 JDK 17 JDK 7 JDK 8
11.0.11Fixed 16 b30Fixed 17Fixed 7u301Fixed 8u271Fixed
Related Reports
Relates :  
Description
 - Intentionally the JTextComponent.setText/getText property was marked as bound=false. It was implementing by marking the JTextComponent.setText() in a special way.
 - But the getText() was overidden in the JPasswordField the java.beans.Introspector started to use information from the this JPasswordField.getText() method instead of information from JTextComponent.setText(). So the "text" property became "bound".

To fix it in a compatible way we may need to override the JTextComponent.setText()  as well and mark it to be "bound=false"

We also have to improve internal data cleanup in the JPasswordField by setText() method.

Comments
Fix Request Should get backported for parity with 11.0.11-oracle. Applies cleanly.
15-01-2021

Changeset: 7afb01dc Author: Sergey Bylokhov <serb@openjdk.org> Date: 2020-12-18 06:26:16 +0000 URL: https://git.openjdk.java.net/jdk16/commit/7afb01dc
18-12-2020