src/share/classes/java/awt/dnd/DragSource.java

Print this page

        

@@ -598,11 +598,11 @@
      * @see      #addDragSourceListener
      * @see      #removeDragSourceListener
      * @since    1.4
      */
     public DragSourceListener[] getDragSourceListeners() {
-        return (DragSourceListener[])getListeners(DragSourceListener.class);
+        return getListeners(DragSourceListener.class);
     }
 
     /**
      * Adds the specified <code>DragSourceMotionListener</code> to this
      * <code>DragSource</code> to receive drag motion events during drag

@@ -658,12 +658,11 @@
      * @see      #addDragSourceMotionListener
      * @see      #removeDragSourceMotionListener
      * @since    1.4
      */
     public DragSourceMotionListener[] getDragSourceMotionListeners() {
-        return (DragSourceMotionListener[])
-            getListeners(DragSourceMotionListener.class);
+        return getListeners(DragSourceMotionListener.class);
     }
 
     /**
      * Gets all the objects currently registered as
      * <code><em>Foo</em>Listener</code>s upon this <code>DragSource</code>.

@@ -894,12 +893,12 @@
      * @return the drag gesture motion threshold
      * @see MouseDragGestureRecognizer
      * @since 1.5
      */
     public static int getDragThreshold() {
-        int ts = ((Integer)AccessController.doPrivileged(
-                new GetIntegerAction("awt.dnd.drag.threshold", 0))).intValue();
+        int ts = AccessController.doPrivileged(
+                new GetIntegerAction("awt.dnd.drag.threshold", 0)).intValue();
         if (ts > 0) {
             return ts;
         } else {
             Integer td = (Integer)Toolkit.getDefaultToolkit().
                     getDesktopProperty("DnD.gestureMotionThreshold");