diff options
Diffstat (limited to 'libjava/java/awt/dnd')
-rw-r--r-- | libjava/java/awt/dnd/DnDConstants.java | 9 | ||||
-rw-r--r-- | libjava/java/awt/dnd/DropTarget.java | 9 |
2 files changed, 11 insertions, 7 deletions
diff --git a/libjava/java/awt/dnd/DnDConstants.java b/libjava/java/awt/dnd/DnDConstants.java index 3e78121..a64fa5a 100644 --- a/libjava/java/awt/dnd/DnDConstants.java +++ b/libjava/java/awt/dnd/DnDConstants.java @@ -1,5 +1,5 @@ /* DnDConstants.java -- constants for drag-and-drop operations - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -69,4 +69,9 @@ public final class DnDConstants /** A synonym for {@link #ACTION_LINK}. */ public static final int ACTION_REFERENCE = ACTION_LINK; -} // class DnDConstants + + private DnDConstants() + { + // Do nothing here. + } +} diff --git a/libjava/java/awt/dnd/DropTarget.java b/libjava/java/awt/dnd/DropTarget.java index 7379ca7..2a8b79d 100644 --- a/libjava/java/awt/dnd/DropTarget.java +++ b/libjava/java/awt/dnd/DropTarget.java @@ -205,15 +205,14 @@ public class DropTarget /** * Adds a new <code>DropTargetListener</code>. * - * @exception TooManyListenersException If there is already a - * <code>DropTargetListener</code>. + * @exception TooManyListenersException Sun's JDK does not, despite + * documentation, throw this exception here when you install an additional + * <code>DropTargetListener</code>. So to be compatible, we do the same + * thing. */ public void addDropTargetListener (DropTargetListener dtl) throws TooManyListenersException { - if (dtl != null) - throw new TooManyListenersException (); - dropTargetListener = dtl; } |