changeset 4903:3e9d35e6ee4f

7110590: DnDMerlinQLTestsuite_DnDJTextArea test fails with an java.awt.dnd.InvalidDnDOperationException Reviewed-by: art
author denis
date Tue, 17 Jan 2012 19:09:32 +0400
parents 59b8875949e1
children 89bc9d08fe82
files src/share/classes/java/awt/AWTKeyStroke.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/AWTKeyStroke.java	Mon Jan 16 18:28:56 2012 +0400
+++ b/src/share/classes/java/awt/AWTKeyStroke.java	Tue Jan 17 19:09:32 2012 +0400
@@ -802,8 +802,11 @@
      */
     protected Object readResolve() throws java.io.ObjectStreamException {
         synchronized (AWTKeyStroke.class) {
-            return getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease);
+            if (getClass().equals(getAWTKeyStrokeClass())) {
+                return  getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease);
+            }
         }
+        return this;
     }
 
     private static int mapOldModifiers(int modifiers) {