Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4601#discussion_r139682161
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/DispatcherRestEndpoint.java
 ---
    @@ -77,8 +74,11 @@ protected void setupChannelHandlers(Router router, 
CompletableFuture<String> res
                        optWebContent = Optional.empty();
                }
     
    -           optWebContent.ifPresent(
    -                   webContentHandler -> router.GET("/:*", 
webContentHandler));
    +           return optWebContent
    +                   .map(webContent ->
    +                           Collections.singleton(
    +                                   Tuple2.<RestHandlerSpecification, 
ChannelInboundHandler>of(WebContentHandlerSpecification.getInstance(), 
webContent)))
    +                   .orElseGet(() -> Collections.emptySet());
    --- End diff --
    
    I would like to do this in one of the follow up PRs where I actually add 
more REST handlers, if that's ok.


---

Reply via email to