Skip to content

Commit

Permalink
more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Jul 22, 2024
1 parent 22050c5 commit b43821d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,9 @@ public <T extends SszData> Stream<T> randomDataStream(final SszSchema<T> schema)
SszCollection<SszData> ret = collectionSchema.createFromElements(children);
return (T) ret;
});
} else if (schema instanceof SszUnionSchema) {
} else if (schema instanceof SszUnionSchema<?> unionSchema) {
return Stream.generate(
() -> {
SszUnionSchema<?> unionSchema = (SszUnionSchema<?>) schema;
int selector = random.nextInt(unionSchema.getTypesCount());
return (T)
unionSchema.createFromValue(
Expand Down

0 comments on commit b43821d

Please sign in to comment.