JDK-4890404 : Swing components should handle IllegalStateExceptions when using the clipboard
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0,1.4.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,windows_2000
  • CPU: generic,x86
  • Submitted: 2003-07-14
  • Updated: 2017-05-16
  • Resolved: 2004-01-16
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 Availabitlity Release.

To download the current JDK release, click here.
Other
5.0 b35Fixed
Description

Name: jk109818			Date: 07/14/2003


FULL PRODUCT VERSION :
java version "1.4.1_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_03-b02)
Java HotSpot(TM) Client VM (build 1.4.1_03-b02, mixed mode)

FULL OS VERSION :
Microsoft Windows 2000 [Version 5.00.2195]

A DESCRIPTION OF THE PROBLEM :
When swing components are working with the clipboard they should handle the
possible IllegalStateException thrown by the getContents() or setContents() operations as mentioned in bug with id 4464162.

The IllegalStateException is thrown when another process is busy with the clipboard, swing components that use the clipboard will get the IllegalStateException. If this happens while the user uses the "ctrl-c" or "ctrl-v" shortcuts, there is absolutely no application code in the stack when the IllegalStateException occurs.

Thus, if you get an IllegalStateException, causes the application to crash, as there is nothing that handles the exception.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Be very quick with ctrl-c/ctrl-v


REPRODUCIBILITY :
This bug can be reproduced occasionally.
(Incident Review ID: 191146) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b35 tiger-beta2
2004-06-14

EVALUATION Name: dsR10078 Date: 07/15/2003 This looks like a Swing problem. ###@###.### 2003-07-15 ====================================================================== It's unlikely that this will happen very often, but if it does, allowing the exception to propogate isn't very nice. The Swing operation should fail nicely, perhaps notifying the caller of the failure in a nice way. This should be considered for tiger. Committing for now. ###@###.### 2003-10-01 TransferHandler.exportToClipboard() will be changed to call exportDone() with a NONE action and then propogate the exception if an exception occurs. The Swing actions that deal with DnD will be changed to handle the exception more gracefully. In the CUT/COPY/PASTE actions we'll provide error feedback. In DefaultCaret, where the system selection is updated, a more appropriate thing to do will be to just catch the exception. ###@###.### 2003-12-04
2003-12-04