fhueske commented on code in PR #28212:
URL: https://github.com/apache/flink/pull/28212#discussion_r3286878241


##########
flink-table/flink-table-test-utils/src/main/java/org/apache/flink/table/runtime/functions/ProcessTableFunctionTestHarness.java:
##########
@@ -1420,33 +1417,24 @@ private abstract static class ArgumentInfo {
         }
 
         static List<StateArgumentInfo> filterStateArguments(List<ArgumentInfo> 
arguments) {
-            List<StateArgumentInfo> result = new ArrayList<>();
-            for (ArgumentInfo arg : arguments) {
-                if (arg instanceof StateArgumentInfo) {
-                    result.add((StateArgumentInfo) arg);
-                }
-            }
-            return result;
+            return arguments.stream()
+                    .filter(arg -> arg instanceof StateArgumentInfo)
+                    .map(arg -> (StateArgumentInfo) arg)
+                    .toList();

Review Comment:
   just got reminded that `toList()` isn't supported by Java 11 
(https://github.com/apache/flink/commit/3ac4da3bb860ce1ed1c627fd703aaa1c1d4e96d1)
 😐  
   Use `.collect(Collectors.toList())` instead.



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