changeset 11164:3c08f7316a87

7155963: Deadlock in SystemFlavorMap.getFlavorsForNative and SunToolkit.awtLock Reviewed-by: ant, serb
author azvegint
date Mon, 15 Dec 2014 16:00:53 +0300
parents 77220c0c540e
children 549a6b894938
files src/java.desktop/unix/classes/sun/awt/X11/XClipboard.java
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/unix/classes/sun/awt/X11/XClipboard.java	Thu Dec 11 15:19:12 2014 +0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XClipboard.java	Mon Dec 15 16:00:53 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -281,6 +281,11 @@
             }
         }
 
-        checkChange(formats);
+        XToolkit.awtUnlock();
+        try {
+            checkChange(formats);
+        } finally {
+            XToolkit.awtLock();
+        }
     }
 }