hotspot/test/serviceability/threads/TestFalseDeadLock.java
changeset 27453 9aeb9b97bef6
parent 18085 fb6d02a9e1c5
child 27480 51e6396f8a98
--- a/hotspot/test/serviceability/threads/TestFalseDeadLock.java	Sun Nov 02 18:43:00 2014 +0300
+++ b/hotspot/test/serviceability/threads/TestFalseDeadLock.java	Sun Nov 02 18:43:38 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,7 @@
  * questions.
  */
 
+import com.oracle.java.testlibrary.Utils;
 import java.lang.management.ManagementFactory;
 import java.lang.management.ThreadMXBean;
 import java.util.Random;
@@ -29,6 +30,7 @@
  * @test
  * @bug 8016304
  * @summary Make sure no deadlock is reported for this program which has no deadlocks.
+ * @library /testlibrary
  * @run main/othervm TestFalseDeadLock
  */
 
@@ -65,7 +67,7 @@
 
     public static class Test implements Runnable {
         public void run() {
-            Random r = new Random();
+            Random r = Utils.getRandomInstance();
             while (running) {
                 try {
                     synchronized (this) {