On Mon, 1 Mar 2021 15:12:46 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> throw new IllegalArgumentException("The random number generator "" + name + 
>> "" can not be located");
>
> The message only captures the failure if the result of `fm.get()` is null.
> It does not capture the failure if the name is found but does not support the 
> category.

if (provider == null) {
            throw new IllegalArgumentException("No implementation of the random 
number generator algorithm "" +
                                                name +
                                                "" is available");
        } else if (!isSubclass(category, provider)) {
            throw new IllegalArgumentException("The random number generator 
algorithm "" +
                                                name +
                                                "" is not implemented with the 
interface "" +
                                                category.simpleName() +
                                                """);
        }

-------------

PR: https://git.openjdk.java.net/jdk/pull/1292

Reply via email to