United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4890404 Swing components should handle IllegalStateExceptions when using the clipboard
JDK-4890404 : Swing components should handle IllegalStateExceptions when using the clipboard

Details
Type:
Bug
Submit Date:
2003-07-14
Status:
Resolved
Updated Date:
2004-01-16
Project Name:
JDK
Resolved Date:
2004-01-16
Component:
client-libs
OS:
generic,windows_2000
Sub-Component:
javax.swing
CPU:
x86,generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0,1.4.1
Fixed Versions:
5.0 (b35)

Related Reports

Sub Tasks

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
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
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-beta2

FIXED IN:
tiger-beta2

INTEGRATED IN:
tiger-b35
tiger-beta2


                                     
2004-06-14



Hardware and Software, Engineered to Work Together