tillrohrmann commented on a change in pull request #16930:
URL: https://github.com/apache/flink/pull/16930#discussion_r693945317



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeOffsets.java
##########
@@ -141,8 +150,7 @@ public KeyGroupRange getKeyGroupRange() {
     private int computeKeyGroupIndex(int keyGroup) {
         int idx = keyGroup - keyGroupRange.getStartKeyGroup();
         if (idx < 0 || idx >= offsets.length) {
-            throw new IllegalArgumentException(
-                    "Key group " + keyGroup + " is not in " + keyGroupRange + 
".");
+            throw newIllegalKeyGroupException(keyGroup, keyGroupRange);

Review comment:
       I think we are double throwing something here. Maybe let 
`newIllegalKeyGroupException` method only return the `IllegalStateException` 
instead of throwing it.




-- 
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]


Reply via email to