-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
5.0
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Have developed a custom cell editor for a JTable. This editor is derived from AbstractCellEditor. The editor overrides the isCellEditable () method to ensure
cell editing is not started with a single click. Under the following 2 conditions this
method is being called with a null pointer:
1. When the escape key is clicked.
2. With some single clicks of the mouse.
isCellEditable () cannot distinguish these 2 events because of the null argument and must reutrn false whenever its argument is null. Ideally I would like to return
true on the first item (escape key) and false on the second.
There is at least one occurance of a call to editCellAt () in JTable that does not include an EventObject (line 3483). I suspect this is (at least partially) the source of the problem.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
JTable and its associated classes should always pass a valid EventObject to AbstractCellEditor.isCellEditable ().
ACTUAL -
null EventObject passed to isCellEditable ().
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Have developed a custom cell editor for a JTable. This editor is derived from AbstractCellEditor. The editor overrides the isCellEditable () method to ensure
cell editing is not started with a single click. Under the following 2 conditions this
method is being called with a null pointer:
1. When the escape key is clicked.
2. With some single clicks of the mouse.
isCellEditable () cannot distinguish these 2 events because of the null argument and must reutrn false whenever its argument is null. Ideally I would like to return
true on the first item (escape key) and false on the second.
There is at least one occurance of a call to editCellAt () in JTable that does not include an EventObject (line 3483). I suspect this is (at least partially) the source of the problem.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
JTable and its associated classes should always pass a valid EventObject to AbstractCellEditor.isCellEditable ().
ACTUAL -
null EventObject passed to isCellEditable ().
REPRODUCIBILITY :
This bug can be reproduced always.
- relates to
-
JDK-4852305 JTable.processKeyBinding method: delivery of null EventObject at editCellAt
-
- Resolved
-