izzyacademy commented on a change in pull request #10926: URL: https://github.com/apache/kafka/pull/10926#discussion_r660953683
########## File path: streams/src/main/java/org/apache/kafka/streams/kstream/JoinWindows.java ########## @@ -83,6 +83,14 @@ protected JoinWindows(final JoinWindows joinWindows) { afterMs = joinWindows.afterMs; graceMs = joinWindows.graceMs; enableSpuriousResultFix = joinWindows.enableSpuriousResultFix; + + if (beforeMs + afterMs < 0) { + throw new IllegalArgumentException("Window interval (ie, beforeMs+afterMs) must not be negative."); Review comment: > Could we make this Constructor to call another overloaded constructor, to avoid duplicated codes? i.e. > > ```java > protected JoinWindows(final JoinWindows joinWindows) { > this(joinWindows.beforeMs, joinWindows.afterMs, joinWindows.graceMs, joinWindows.enableSpuriousResultFix); > } > ``` This is done. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org