changeset 10341:29801793a0b0

7155963: Deadlock in SystemFlavorMap.getFlavorsForNative and SunToolkit.awtLock Reviewed-by: ant, serb
author azvegint
date Mon, 15 Dec 2014 16:00:53 +0300
parents e3690e960bef
children 2f6a39955406
files src/solaris/classes/sun/awt/X11/XClipboard.java
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/awt/X11/XClipboard.java	Mon Dec 15 19:21:59 2014 +0100
+++ b/src/solaris/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();
+        }
     }
 }