JDK-4678853 : All JTextComponents should treat replace as an atomic edit
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-05-02
  • Updated: 2003-04-12
  • Resolved: 2002-08-12
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.
Other
1.4.2 mantisFixed
Related Reports
Relates :  
Description
As a fix for 4431047, AbstractDocument was given a replace method. This was designed to allow replacing text to be treated as an atomic operation. The JTextComponent method replaceSelection was then changed to call that new method. Unfortunately, it was overlooked that JEditorPane and JTextPane override that method. Therefore, they do not automatically see the benefit of this change. Those two methods should be looked at and changed to use the new replace method.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis mantis-b02 FIXED IN: mantis mantis-b02 INTEGRATED IN: mantis mantis-b02
14-06-2004

EVALUATION Yes, these should use the new method as well. ###@###.### 2002-05-17 setText, and any other methods that call into remove/insert should also be changed to call into the new method. ###@###.### 2002-07-16 Here is the breakdown of changes needed: JTextComponent.setText JEditorPane.replaceSelection JTextPane.replaceSelection JTextArea.replaceRange ###@###.### 2002-07-19
16-07-2002