changeset 16945:1a8997b4292d

8177984: (ch) java/nio/channels/SocketChannel/VectorIO.java should use RandomFactory Summary: Obtain Random from RandomFactory instead of directly. Reviewed-by: clanger
author bpb
date Tue, 04 Apr 2017 08:10:13 -0700
parents d584006ddd5d
children f940fd4232d8
files test/java/nio/channels/SocketChannel/VectorIO.java
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/nio/channels/SocketChannel/VectorIO.java	Tue Apr 04 19:27:38 2017 +0530
+++ b/test/java/nio/channels/SocketChannel/VectorIO.java	Tue Apr 04 08:10:13 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -22,8 +22,10 @@
  */
 
 /* @test
- * @summary Test socketchannel vector IO
- * @library ..
+ * @summary Test socketchannel vector IO (use -Dseed=X to set PRNG seed)
+ * @library .. /lib/testlibrary/
+ * @build jdk.testlibrary.RandomFactory
+ * @run main VectorIO
  * @key randomness
  */
 
@@ -32,11 +34,11 @@
 import java.nio.*;
 import java.nio.channels.*;
 import java.util.*;
-
+import jdk.testlibrary.RandomFactory;
 
 public class VectorIO {
 
-    static Random generator = new Random();
+    private static Random generator = RandomFactory.getRandom();
 
     static int testSize;
 
@@ -100,8 +102,6 @@
     static class Server
         extends TestThread
     {
-        static Random generator = new Random();
-
         final int testSize;
         final ServerSocketChannel ssc;