Ensure static Set is unmodifiable
@@ -61,10 +61,10 @@ import static com.pholser.junit.quickcheck.internal.Items.*;
import static com.pholser.junit.quickcheck.internal.Reflection.*;
public class GeneratorRepository implements Generators {
- private static final Set<String> NULLABLE_ANNOTATIONS = Stream.of(
+ private static final Set<String> NULLABLE_ANNOTATIONS = Collections.unmodifiableSet(Stream.of(
"javax.annotation.Nullable", // JSR-305
"org.jetbrains.annotations.Nullable" // Kotlin
- ).collect(toSet());
+ ).collect(toSet()));
private final SourceOfRandomness random;
private final Map<Class<?>, Set<Generator<?>>> generators;
