Java 8 - The method map is not applicable for the arguments (<noType>)
<p>I wanted to refactor my method which filter AssetLink object, get Content object that is a target of AssetLink, and then set fields of ContentLinkMetadata object basing on Content object. My new method looks like that:</p>

<pre><code>private List&lt;ContentLinkMetadata&gt; getAndFillInternalLinks(final Lesson lesson) {
    List&lt;ContentLinkMetadata&gt; internalLinks = new ArrayList&lt;&gt;();
        lesson.getAssetLinks().stream()
        .filter(linkAsAssetLink -&gt; ALLOWED_INTERNAL_LINK_TYPES.contains(linkAsAssetLink.getTargetType()))
        .map(linkAsAssetLink -&gt; {
            Content link = contentProvider.getLazyById(linkAsAssetLink.getTargetId());
            ContentLinkMetadata internalLink = new ContentLinkMetadata();

            internalLink.setDescription(link.getDescription());
            internalLink.setId(link.getId());
            internalLink.setTitle(link.getTitle());
            internalLink.setFriendlyUrl(friendlyUrlResolver.makeUrl(link));
            internalLink.setTypeId(link.getTypeId());

            internalLinks.add(internalLink);
        });

        return internalLinks;
}
</code></pre>

<p>But I'm getting error on .map which says "The method map in type Stream is not applicable for the arguments (noType linkAsAssetLink) and i don't understand that. Why it says that linkAsAssetLink is "noType" it is AssetLink in fact and I can use it's method in contentProvider's method. Can you tell me where am I doing a mistake?</p>