This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git
The following commit(s) were added to refs/heads/master by this push:
new 79187bb Avoid unchecked conversion warning
79187bb is described below
commit 79187bb979b26201b5a18f4088d6d30dfe425433
Author: aherbert <[email protected]>
AuthorDate: Tue Jul 20 13:00:51 2021 +0100
Avoid unchecked conversion warning
---
.../java/org/apache/commons/rng/sampling/CompositeSamplers.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/CompositeSamplers.java
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/CompositeSamplers.java
index a269338..aaa91ac 100644
---
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/CompositeSamplers.java
+++
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/CompositeSamplers.java
@@ -604,8 +604,9 @@ public final class CompositeSamplers {
* @param <T> Type of sample
* @return the factory
*/
+ @SuppressWarnings("unchecked")
static <T> ObjectSamplerFactory<T> instance() {
- return INSTANCE;
+ return (ObjectSamplerFactory<T>) INSTANCE;
}
@Override
@@ -655,8 +656,9 @@ public final class CompositeSamplers {
* @param <T> Type of sample
* @return the factory
*/
+ @SuppressWarnings("unchecked")
static <T> SharedStateObjectSamplerFactory<T> instance() {
- return INSTANCE;
+ return (SharedStateObjectSamplerFactory<T>) INSTANCE;
}
@Override