summaryrefslogtreecommitdiff
path: root/libjava/classpath/java/awt/Button.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/awt/Button.java')
-rw-r--r--libjava/classpath/java/awt/Button.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/libjava/classpath/java/awt/Button.java b/libjava/classpath/java/awt/Button.java
index ae897a2f75f..4c246c7650b 100644
--- a/libjava/classpath/java/awt/Button.java
+++ b/libjava/classpath/java/awt/Button.java
@@ -352,11 +352,11 @@ removeActionListener(ActionListener listener)
*
* @since 1.3
*/
- public EventListener[] getListeners(Class listenerType)
+ public <T extends EventListener> T[] getListeners(Class<T> listenerType)
{
if (listenerType == ActionListener.class)
- return getActionListeners();
- return (EventListener[]) Array.newInstance(listenerType, 0);
+ return (T[]) getActionListeners();
+ return (T[]) Array.newInstance(listenerType, 0);
}
/*************************************************************************/