hermanjakobsen commented on code in PR #19937:
URL: https://github.com/apache/kafka/pull/19937#discussion_r2504941061
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/ForwardingDisabledProcessorContext.java:
##########
@@ -93,7 +94,15 @@ public <S extends StateStore> S getStateStore(final String
name) {
public Cancellable schedule(final Duration interval,
final PunctuationType type,
final Punctuator callback) throws
IllegalArgumentException {
- return delegate.schedule(interval, type, callback);
+ return delegate.schedule(null, interval, type, callback);
Review Comment:
Going for `Optional<Instant>` would require to change the type of the input
parameter to `Optional<Instant>`. It is [discouraged by the designers of
`Optional` to use it as method
parameter](https://stackoverflow.com/questions/26327957/should-java-8-getters-return-optional-type/26328555#26328555)
as, among other things, it makes the API more difficult to use.
Instead, I tried to structure the `schedule` methods a bit better. As a
result, `null` is no longer used as an input argument.
I was not able to remove the use of `null` in the
`test-utils/MockApiProcessor` since the `startTime` is indeed not defined for
unanchored punctuations. By setting a sentinel value of `Instant.EPOCH` some of
the tests broke, and I do not want to affect existing tests and functionality.
--
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]