# HG changeset patch # User bpb # Date 1491244538 25200 # Mon Apr 03 11:35:38 2017 -0700 # Node ID 3f3bb14dd1ae84d384ea1ee1cc65f7bfd429f250 # Parent 6dea581453d7c0e767e3169cfec8b423a381e71d 8177984: (ch) java/nio/channels/SocketChannel/VectorIO.java should use RandomFactory Summary: Obtain Random from RandomFactory instead of directly. Reviewed-by: XXX diff --git a/test/java/nio/channels/SocketChannel/VectorIO.java b/test/java/nio/channels/SocketChannel/VectorIO.java --- a/test/java/nio/channels/SocketChannel/VectorIO.java +++ b/test/java/nio/channels/SocketChannel/VectorIO.java @@ -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;