--- /home/cpdev/src/classpath/java/awt/AWTKeyStroke.java	2005-08-21 05:32:36.000000000 +0000
+++ java/awt/AWTKeyStroke.java	2005-09-14 21:51:37.000000000 +0000
@@ -1,5 +1,5 @@
 /* AWTKeyStroke.java -- an immutable key stroke
-   Copyright (C) 2002, 2004, 2005  Free Software Foundation
+   Copyright (C) 2002, 2004, 2005 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -65,6 +65,7 @@
  * no-arg constructor (of any accessibility).
  *
  * @author Eric Blake (ebb9@email.byu.edu)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
  * @see #getAWTKeyStroke(char)
  * @since 1.4
  * @status updated to 1.4
@@ -85,13 +86,15 @@
    * under the assumption that garbage collection of a new keystroke is
    * easy when we find the old one that it matches in the cache.
    */
-  private static final LinkedHashMap cache = new LinkedHashMap(11, 0.75f, true)
+  private static final LinkedHashMap<AWTKeyStroke,AWTKeyStroke> cache =
+    new LinkedHashMap<AWTKeyStroke,AWTKeyStroke>(11, 0.75f, true)
   {
     /** The largest the keystroke cache can grow. */
     private static final int MAX_CACHE_SIZE = 2048;
 
     /** Prune stale entries. */
-    protected boolean removeEldestEntry(Map.Entry eldest)
+    protected boolean removeEldestEntry(Map.Entry<AWTKeyStroke,AWTKeyStroke>
+					eldest)
     {	// XXX - FIXME Use Map.Entry, not just Entry  as gcj 3.1 workaround.
       return size() > MAX_CACHE_SIZE;
     }
@@ -114,7 +117,7 @@
    *
    * @see #getAWTKeyStroke(String)
    */
-  static final HashMap vktable = new HashMap();
+  static final HashMap<String,Object> vktable = new HashMap<String,Object>();
   static
   {
     // Using reflection saves the hassle of keeping this in sync with KeyEvent,
@@ -229,7 +232,7 @@
    * @throws IllegalArgumentException subclass doesn't have no-arg constructor
    * @throws ClassCastException subclass doesn't extend AWTKeyStroke
    */
-  protected static void registerSubclass(final Class subclass)
+  protected static void registerSubclass(final Class<?> subclass)
   {
     if (subclass == null)
       throw new IllegalArgumentException();
@@ -252,7 +255,8 @@
                 throws NoSuchMethodException, InstantiationException,
                        IllegalAccessException, InvocationTargetException
               {
-                Constructor c = subclass.getDeclaredConstructor(null);
+                Constructor<?> c =
+		  subclass.getDeclaredConstructor((Class<?>[])null);
                 c.setAccessible(true);
                 // Create a new instance, to make sure that we can, and
                 // to cause any ClassCastException.
@@ -595,7 +599,7 @@
    */
   protected Object readResolve() throws ObjectStreamException
   {
-    AWTKeyStroke s = (AWTKeyStroke) cache.get(this);
+    AWTKeyStroke s = cache.get(this);
     if (s != null)
       return s;
     cache.put(this, this);
