Skip to content

Report error for result types with wildcard extends bound #266

@hduelme

Description

@hduelme

MapStruct does not support result types with an extends bound. For example

import java.util.List;
import org.mapstruct.Mapper;

@Mapper
public interface BoundMapper {
    List<? extends Number> toExtends(List<Integer> in);
}

is invalide, because of the wildcard extends bound ? extends . MapStruct reports this as

Can't generate mapping method for a wildcard extends bound result.

Currently the plugin doesn't report this as an error.

One possible QuickFix could be removing the wildcard extends bound ? extends .

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions