title: How to fix java lambda filter(missing return statement) with future
body: <p>How to solve java lambda filter future collection?</p>
  
  <p>I got a future collection, And I want to filter out the false result returned in the collection, but using lambda to report (Missing return statement), I want to get a collection looks like <code>List&lt;Map&lt;String, Object&gt;&gt;</code>. What should I do to achieve filtering? </p>
  
  <pre><code>List&lt;Future&lt;Map&lt;String, Object&gt;&gt;&gt; future = 
      childIds.getChildOrder()
              .stream()
              .map(i -&gt; service.submit(new some(i)))
              .collect(Collectors.toList());
  
              future.stream().filter(i -&gt; {
                  try {
                      i.get().get("success").equals(Boolean.FALSE);
                  } catch (InterruptedException e) {
                      e.printStackTrace();
                  } catch (ExecutionException e) {
                      e.printStackTrace();
                  }
              }).findAny().get().get();
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/mIWfy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mIWfy.png" alt="enter image description here"></a></p>
  
  <p>The <code>Map&lt;String, Object&gt;</code> structure looks like this  <code>{"success":"false", "msg":"I got error"}</code></p>