8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

8332476: j.u.r.RandomGeneratorFactor.create(long|byte[]) should throw rather than silently fallback to no-arg create()

Reviewed-by: jpai
This commit is contained in:
Raffaello Giulietti 2024-05-21 12:53:03 +00:00
parent 5cf8288b80
commit 42e3c842ae
19 changed files with 337 additions and 397 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2024, 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
@ -32,8 +32,6 @@ import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
import jdk.internal.util.random.RandomSupport.*;
import static jdk.internal.util.random.RandomSupport.*;
import jdk.internal.misc.Unsafe;
@ -77,11 +75,6 @@ import jdk.internal.misc.Unsafe;
* @author Frank Yellin
* @since 1.0
*/
@RandomGeneratorProperties(
name = "Random",
i = 48, j = 0, k = 0,
equidistribution = 0
)
public class Random implements RandomGenerator, java.io.Serializable {
/**