7080289: AWTKeystroke class registers a subclass factory during deserialization
authordenis
Mon, 26 Sep 2011 18:18:29 +0400
changeset 10584 012dafac5b62
parent 10583 8bb208d39fb1
child 10585 1016a2947a34
child 10688 120c7e8ab07d
7080289: AWTKeystroke class registers a subclass factory during deserialization Reviewed-by: serb
jdk/src/share/classes/java/awt/AWTKeyStroke.java
--- a/jdk/src/share/classes/java/awt/AWTKeyStroke.java	Mon Sep 26 17:59:52 2011 +0400
+++ b/jdk/src/share/classes/java/awt/AWTKeyStroke.java	Mon Sep 26 18:18:29 2011 +0400
@@ -777,10 +777,6 @@
      */
     protected Object readResolve() throws java.io.ObjectStreamException {
         synchronized (AWTKeyStroke.class) {
-            Class newClass = getClass();
-            if (!newClass.equals(ctor.getDeclaringClass())) {
-                registerSubclass(newClass);
-            }
             return getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease);
         }
     }