Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6691328
Votes 0
Synopsis DragSourceContext returns unexpected cursor
Category java:classes_awt
Reported Against b08 , b27
Release Fixed 7(b29)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 6535356 , 6716137
Submit Date 21-APR-2008
Description
Test case
api/java_awt/dnd/DragSourceContext/index.html#other[DragSourceContext0012]

Fails on:
*openJDK 6*: b08 (/java/re/openjdk/6/promoted/ea/b08/openjdk/binaries/linux-ubuntu)
*JCK*: 6b b21 JCK-runtime
*platform*:  ubuntu 8.10 (Hardy Heron), Windows
Passes on: *JDK6uX*

For java.awt.dnd.DragSourceContext if current cursor is null, after updateCurrentCursor() operation, method getCursor() returns unexpected result - instead of DragSource.DefaultCopyDrop it returns DragSource.DefaultCopyNoDrop.

Please see attached independent test source.
It fails with the message:
bad cursor: sun.awt.windows.WCustomCursor[CopyNoDrop32x32], expected: sun.awt.windows.WCustomCursor[CopyDrop32x32] 
or
bad cursor: sun.awt.X11.XCustomCursor[CopyNoDrop32x32], expected: sun.awt.X11.XCustomCursor[CopyDrop32x32]
Posted Date : 2008-04-21 09:09:43.0
Work Around
N/A
Evaluation
This is a regression of the fix for 6535356. The fix incorrectly modifies the updateCurrentCursor method of the java.awt.dnd.DragSourceContext class, by mistake the target actions is set to DnDConstants.ACTION_NONE; the udiffs are:

         // do defaults processing
         Cursor c = null;
+        targetAct = DnDConstants.ACTION_NONE;
         switch (status) {
-            default:
-                targetAct = DnDConstants.ACTION_NONE;
             case ENTER:
             case OVER:
             case CHANGED:
                 int    ra = sourceAct & targetAct;
Posted Date : 2008-05-27 16:02:16.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang