JDK-6287092 : JCK15a: api/java_awt/interactive/event/EventTests.html#EventTest0015 fails, mustang
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: generic
  • Submitted: 2005-06-17
  • Updated: 2012-03-23
  • Resolved: 2005-07-23
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 b45Fixed
Related Reports
Relates :  
Description
JCK            : jck1.5a
J2SE           : FAIL - mustang b38
                 PASS - tiger update4, mustang b37
Platform[s]    : FAIL - solaris, linux
switch/Mode    : FAIL - default
JCK test owner : http://javaweb.sfbay/jcce/tcks/jck/docs/others/owners.jto

Failing Tests   : 
api/java_awt/interactive/event/EventTests.html#EventTest0015

Test source location:
=====================
/net/cady/export/dtf/unified/knight-ws/suites/jck/jck1.5a/JCK-runtime-15a/tests/api/java_awt/interactive/event/EventTests.html#EventTest0015

How to reproduce:
==============================================
Run script to start test.
Click "Show Frame" button
Right click on the frame to see the popup menu

-----------------script starts ----------------
#!/bin/sh
#Paths in Java Software:
JDK=/net/koori/onestop/jdk/6.0/promoted/all/b38/binaries/solaris-sparc
#JDK=/net/koori/onestop/jdk/1.5.0_04/promoted/latest/binaries/solaris-sparc
JCK=/net/jsqalab.sfbay/export/testsuites/JCK/jck1.5a/latest/JCK-runtime-15a
CLASSPATH="$JCK/classes:$JCK/lib/javatest.jar"
LD_LIBRARY_PATH="$JCK/lib/SunOS.sparc:$JCK/lib/SunOS.sparc/jmx"
#LD_LIBRARY_PATH="$JCK/lib/Linux.i386:$JCK/lib/Linux.i386/jmx"

export LD_LIBRARY_PATH
POLICYFILE="-Djava.security.policy=$JCK/lib/jck.policy"

TEST="javasoft.sqe.tests.api.java.awt.interactive.event.EventTests -TestCaseID 
ventTest0015"

echo `cat $JCK/build.txt | grep JCK_VERSION` `cat $JCK/build.txt | grep
JCK_BUILD`

$JDK/bin/java -showversion -cp $CLASSPATH $POLICYFILE $TEST
-----------------script ends ----------------

Test output:
=============
On Right-Click, the popup menu does not show but show below error message in the terminal.

JCK_VERSION=1.5a
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b38)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b38, mixed mode)

Exception occurred during event dispatching:
java.lang.ClassCastException: sun.awt.NullComponentPeer cannot be cast to sun.awt.X11.XComponentPeer
        at sun.awt.X11.XPopupMenuPeer.show(XPopupMenuPeer.java:124)
        at java.awt.PopupMenu.show(PopupMenu.java:153)
        at javasoft.sqe.tests.api.java.awt.interactive.event.PopupMenuTrigger.mousePressed(PopupMenuTrigger.java:36)
        at java.awt.Component.processMouseEvent(Component.java:5918)
        at java.awt.Component.processEvent(Component.java:5686)
        at java.awt.Component.dispatchEventImpl(Component.java:4360)
        at java.awt.Component.dispatchEvent(Component.java:4194)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4229)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3890)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3823)
        at java.awt.Container.dispatchEventImpl(Container.java:2011)
        at java.awt.Window.dispatchEventImpl(Window.java:2012)
        at java.awt.Component.dispatchEvent(Component.java:4194)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:592)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:270)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:198)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:171)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:166)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:158)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:119)
EventTest0015: Failed. Event checkbox NOT checked via generation of popup menu event.
STATUS:Failed.test cases: 1; all failed; first test case failure: EventTest0015

Specific Machine Info:
==============================
$ uname -a
SunOS parislv 5.9 Generic_117171-07 sun4u sparc SUNW,Ultra-60

###@###.### 2005-06-17 01:17:20 GMT

Comments
SUGGESTED FIX ------- XPopupMenuPeer.java ------- *** /tmp/sccs.VIaWdg Fri Jun 17 18:15:15 2005 --- XPopupMenuPeer.java Fri Jun 17 18:11:40 2005 *************** *** 138,145 **** if (targetItemVector != null) { reloadItems(targetItemVector); Dimension dim = getDesiredSize(); ! XComponentPeer tp = (XComponentPeer)target.getPeer(); ! Point pt = tp.toGlobal(e.x, e.y); //Fixed 6266513: Incorrect key handling in XAWT popup menu //No item should be selected when showing popup menu if (!ensureCreated()) { --- 138,146 ---- if (targetItemVector != null) { reloadItems(targetItemVector); Dimension dim = getDesiredSize(); ! //Fix for 6287092: JCK15a: api/java_awt/interactive/event/EventTests.html#EventTest0015 fails, mustang ! Point tl = target.getLocationOnScreen(); ! Point pt = new Point(tl.x + e.x, tl.y + e.y); //Fixed 6266513: Incorrect key handling in XAWT popup menu //No item should be selected when showing popup menu if (!ensureCreated()) { ###@###.### 2005-06-17 14:19:15 GMT
17-06-2005

EVALUATION menu regression. ###@###.### 2005-06-17 08:39:05 GMT The is incorrect processing if target had NullComponentPeer ###@###.### 2005-06-17 14:19:15 GMT
17-06-2005