mjsax commented on code in PR #19446: URL: https://github.com/apache/kafka/pull/19446#discussion_r2064413275
########## streams/src/test/java/org/apache/kafka/streams/processor/internals/CopartitionedTopicsEnforcerTest.java: ########## @@ -124,8 +124,8 @@ public void shouldThrowAnExceptionIfRepartitionTopicConfigsWithEnforcedNumOfPart ); final TreeMap<String, Integer> sorted = new TreeMap<>( - Utils.mkMap(Utils.mkEntry(topic1.name(), topic1.numberOfPartitions().get()), - Utils.mkEntry(topic2.name(), topic2.numberOfPartitions().get())) + Utils.mkMap(Utils.mkEntry(topic1.name(), topic1.numberOfPartitions().orElseThrow()), + Utils.mkEntry(topic2.name(), topic2.numberOfPartitions().orElseThrow())) Review Comment: For my own education -- what's wrong with using `get()` here? -- 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