title: How to return List from Java 16 Stream.map()?
body: <p>I am iterating over a list, calling <code>dynamoDBMapper.query()</code> which return a <code>PaginatedQueryList</code>.</p>
  <pre><code>public List&lt;Person&gt; getPerson(final List&lt;UUID&gt; personIds) {
          return personIds.stream().map(personId -&gt;  dynamoDBMapper.query(Person.class, findByPersonId(personId)).stream()
              .map(Person::getPerson))
              .collect(toList());
  }
  </code></pre>
  <p>I need to return List but the error I am getting is :</p>
  <pre><code>Required type:
  List&lt;Person&gt;
  Provided:
  List&lt;Stream&lt;Person&gt;&gt;
  </code></pre>
  <p>Any help will be appreciated.</p>