changeset 4535:25537ca7465f

7110590: DnDMerlinQLTestsuite_DnDJTextArea test fails with an java.awt.dnd.InvalidDnDOperationException Reviewed-by: art
author denis
date Thu, 17 Nov 2011 17:24:36 +0400
parents d3516b13b969
children fb2980d7c943
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	Thu Nov 17 16:29:20 2011 +0400
+++ b/src/share/classes/java/awt/AWTKeyStroke.java	Thu Nov 17 17:24:36 2011 +0400
@@ -805,8 +805,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) {