Skip to content

Report error for result types with wildcard extends bound #266

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 .

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions