JDK-6374308 : redundant ItemEvent/ActionEvent is triggered for empty List, XAWT
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2006-01-19
  • Updated: 2011-01-19
  • Resolved: 2006-03-04
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 6
6 b75Fixed
Related Reports
Relates :  
Description
please, look at the CR#6366126 on Windows platform.
This CR is the same as 6366126 (but on XAWT) - it 
was created to fix separately. To reproduce this 
bug - create an empty list, set focus on the list
and press 'SPACE' - you will that ISC is sent (use
the testcase attached to 6366126).

Comments
SUGGESTED FIX #sccs diffs -C XListPeer.java ------- XListPeer.java ------- *** /tmp/sccs.GWa4gZ Mon Feb 20 19:16:31 2006 --- XListPeer.java Wed Feb 15 15:27:57 2006 *************** *** 895,901 **** // 6190778 CTRL + HOME, CTRL + END keys do not work properly for list on XToolkit // Restoring Motif behavior case KeyEvent.VK_HOME: ! if (!e.isControlDown()) break; if (vsbVis) { vsb.setValue(vsb.getMinimum()); --- 895,901 ---- // 6190778 CTRL + HOME, CTRL + END keys do not work properly for list on XToolkit // Restoring Motif behavior case KeyEvent.VK_HOME: ! if (!e.isControlDown() || ((List)target).getItemCount() <= 0) break; if (vsbVis) { vsb.setValue(vsb.getMinimum()); *************** *** 911,917 **** repaint(); break; case KeyEvent.VK_END: ! if (!e.isControlDown()) break; if (vsbVis) { vsb.setValue(vsb.getMaximum()); --- 911,917 ---- repaint(); break; case KeyEvent.VK_END: ! if (!e.isControlDown() || ((List)target).getItemCount() <= 0) break; if (vsbVis) { vsb.setValue(vsb.getMaximum()); *************** *** 929,935 **** case KeyEvent.VK_SPACE: // Fixed 6299853: XToolkit: Pressing space triggers ItemStateChanged event after List.removeAll called // If getFocusIndex() is less than 0, the event will not be triggered when space pressed ! if (getFocusIndex() < 0) { break; } --- 929,935 ---- case KeyEvent.VK_SPACE: // Fixed 6299853: XToolkit: Pressing space triggers ItemStateChanged event after List.removeAll called // If getFocusIndex() is less than 0, the event will not be triggered when space pressed ! if (getFocusIndex() < 0 || ((List)target).getItemCount() <= 0) { break; }
20-02-2006

EVALUATION we shouldn't trigger events if a list is empty
19-01-2006