Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4658741

Wrong success flag in dragDropEnd of DragSourceListner, in next DnD operations.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.1
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      hopper
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      There is a following case.

      You have performed DnD operation wich finished successfully, i.e. in drop method has set via DropTargetDropEvent#dropComplete(boolean) the flag as true. It is possible to check it in the dragDropEnd method in DragSourceListener.

      Problem is when next DnD operation is taken, and is performed unsuccessfully, i.e. the drop was made over no drop target, i.e. no drop method was invoked on no DropTarget. Then the in the invoked dragDropEnd method the DragSourceDropEvent#getDropSuccess returns true instead of false.

      There is added tescase: (see Attachment)
      1) Run the Test class, and look at console.
      2) Process DnD operation outside to be unsuccessful, you see in the method the flag is false.
      3) Process next DnD operation with successful drop, i.e. to the text area at the right side of frame,
      you see the flag is set to true.
      4) Process nexrt DnD operation like in step 2), but you see different result, the flag is set to true,
      5) Repeating the step 4) gets the same result.


      There seems to be necessary in the inside framework always clear the flag when starting new DnD operation.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dassunw Das Das (Inactive)
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: