summaryrefslogtreecommitdiff
path: root/java/awt/MenuItem.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/awt/MenuItem.java')
-rw-r--r--java/awt/MenuItem.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/awt/MenuItem.java b/java/awt/MenuItem.java
index 7cbc9219f..b80ee4c1a 100644
--- a/java/awt/MenuItem.java
+++ b/java/awt/MenuItem.java
@@ -523,11 +523,11 @@ removeActionListener(ActionListener l)
* ClassClassException is thrown.
* @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);
}
/*************************************************************************/