zentol commented on a change in pull request #9859: [FLINK-11405][rest]rest api 
can more exceptions by query parameter
URL: https://github.com/apache/flink/pull/9859#discussion_r337905652
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/JobExceptionsHandler.java
 ##########
 @@ -71,7 +72,11 @@ public JobExceptionsHandler(
        }
 
        @Override
-       protected JobExceptionsInfo 
handleRequest(HandlerRequest<EmptyRequestBody, JobMessageParameters> request, 
AccessExecutionGraph executionGraph) {
+       protected JobExceptionsInfo 
handleRequest(HandlerRequest<EmptyRequestBody, JobExceptionsMessageParameters> 
request, AccessExecutionGraph executionGraph) {
+               List<Integer> sizes = 
request.getQueryParameter(ExceptionShowSizeParameter.class);
+               if (sizes != null && sizes.size() == 1) {
 
 Review comment:
   the returned list is never null. The size check is overly strict and should 
just check `sizes.size() > 0`. It is fine to use the first value should the 
parameter be defined multiple times.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to