changeset 11983:f87c00a6287f

8080658: Update sun/nio/cs/FindDecoderBugs.java to use random number generator library Reviewed-by: rriggs
author amlu
date Tue, 19 May 2015 11:05:52 -0400
parents eb7d3e11a8cb
children ea3ca5cfc3c6
files test/sun/nio/cs/FindDecoderBugs.java
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/nio/cs/FindDecoderBugs.java	Tue May 19 07:12:10 2015 -0700
+++ b/test/sun/nio/cs/FindDecoderBugs.java	Tue May 19 11:05:52 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, 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
@@ -24,16 +24,19 @@
 /*
  * @test
  * @bug 6380723
- * @summary Decode many byte sequences in many ways
+ * @summary Decode many byte sequences in many ways (use -Dseed=X to set PRNG seed)
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
  * @run main/timeout=1800 FindDecoderBugs
  * @author Martin Buchholz
- * @key randomness
+ * @key intermittent randomness
  */
 
 import java.util.*;
 import java.util.regex.*;
 import java.nio.*;
 import java.nio.charset.*;
+import jdk.testlibrary.RandomFactory;
 
 public class FindDecoderBugs {
 
@@ -322,7 +325,7 @@
         }
     }
 
-    private final static Random rnd = new Random();
+    private final static Random rnd = RandomFactory.getRandom();
     private static byte randomByte() {
         return (byte) rnd.nextInt(0x100);
     }