8265279: Remove unused RandomGeneratorFactory.all(Class<T> category)
Reviewed-by: rriggs
diff --git a/src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java b/src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java
index c095654..44f2b0c 100644
--- a/src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java
+++ b/src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java
@@ -371,31 +371,6 @@
}
/**
- * Returns a stream of matching Providers.
- *
- * @param category {@link RandomGenerator} sub-interface class to filter
- * @param <T> {@link RandomGenerator} sub-interface return type
- *
- * RandomGenerators that are marked as deprecated or are not properly configured are not included in the result.
- *
- * @implSpec Availability is determined by RandomGeneratorFactory using the service provider API
- * to locate implementations of the RandomGenerator interface.
- *
- * @return Stream of matching {@link RandomGeneratorFactory RandomGeneratorFactory(s)}.
- *
- * @hidden
- */
- public static <T extends RandomGenerator> Stream<RandomGeneratorFactory<T>> all(Class<T> category) {
- Map<String, Provider<? extends RandomGenerator>> fm = getFactoryMap();
- return fm.values()
- .stream()
- .filter(p -> isSubclass(category, p) &&
- !p.type().isAnnotationPresent(Deprecated.class) &&
- p.type().isAnnotationPresent(RandomGeneratorProperties.class))
- .map(RandomGeneratorFactory::new);
- }
-
- /**
* Returns a non-empty stream of available {@link RandomGeneratorFactory RandomGeneratorFactory(s)}.
*
* RandomGenerators that are marked as deprecated or are not properly configured are not included in the result.