changeset 8218:f94dd20a1efa jdk7u79-b08

8071591: java/util/logging/LogManagerAppContextDeadlock.java test started to fail due to JDK-8065991 Reviewed-by: dfuchs, coffeys
author mcherkas
date Wed, 28 Jan 2015 15:43:15 +0400
parents 99cb37d67a88
children f90bbaeb7ba4
files test/java/util/logging/LogManagerAppContextDeadlock.java
diffstat 1 files changed, 33 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/util/logging/LogManagerAppContextDeadlock.java	Wed Jan 28 18:47:45 2015 +0000
+++ b/test/java/util/logging/LogManagerAppContextDeadlock.java	Wed Jan 28 15:43:15 2015 +0400
@@ -38,7 +38,7 @@
 
 /**
  * @test
- * @bug 8065991
+ * @bug 8065991 8071591
  * @summary check that when LogManager is initialized, a deadlock similar
  *          to that described in 8065709 will not occur.
  * @run main/othervm LogManagerAppContextDeadlock UNSECURE
@@ -107,6 +107,31 @@
                     return getAppContext();
                 }
 
+                @Override
+                public Object get(Object key) {
+                    return null;
+                }
+
+                @Override
+                public void put(Object key, Object value) {
+
+                }
+
+                @Override
+                public void remove(Object key) {
+
+                }
+
+                @Override
+                public boolean isDisposed() {
+                    return false;
+                }
+
+                @Override
+                public boolean isMainAppContext() {
+                    return false;
+                }
+
             });
         }
 
@@ -123,7 +148,7 @@
         }
     }
 
-    public static void test(TestCase test) throws Exception {
+    public static void test(final TestCase test) throws Exception {
         Thread t1 = new Thread() {
             @Override
             public void run() {
@@ -228,7 +253,12 @@
         @Override
         public void run() {
             sem3.release();
-            Configure.doPrivileged(this::loop);
+            Configure.doPrivileged(new Runnable() {
+                @Override
+                public void run() {
+                    DeadlockDetector.this.loop();
+                }
+            });
         }
         public void loop() {
             while(goOn) {