opwvhk commented on code in PR #1867:
URL: https://github.com/apache/avro/pull/1867#discussion_r1017480640
##########
lang/java/avro/src/main/java/org/apache/avro/util/RandomData.java:
##########
@@ -146,6 +152,23 @@ private Object generate(Schema schema, Random random, int
d) {
private static final Charset UTF8 = StandardCharsets.UTF_8;
+ private int randomInt(Random random, LogicalType type) {
+ if (type instanceof LogicalTypes.TimeMillis) {
+ return random.nextInt(RandomData.MILLIS_IN_DAY - 1);
Review Comment:
The upper bound of nextInt is already exclusive. Why subtract one more?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]