izzyacademy commented on a change in pull request #10926: URL: https://github.com/apache/kafka/pull/10926#discussion_r658403881
########## File path: streams/src/main/java/org/apache/kafka/streams/kstream/SlidingWindows.java ########## @@ -78,6 +82,43 @@ private SlidingWindows(final long timeDifferenceMs, final long graceMs) { this.timeDifferenceMs = timeDifferenceMs; this.graceMs = graceMs; + + if (timeDifferenceMs < 0) { + throw new IllegalArgumentException("Window time difference must not be negative."); + } + + if (graceMs < 0) { + throw new IllegalArgumentException("Window grace period must not be negative."); + } + } + + /** + * Return a window definition with the window size Review comment: This has been addressed -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org