Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Report error for result types with wildcard extends bound

Open
#266 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java
Domain
tooling

Research direction

Start by reproducing the issue with the BoundMapper example in IntelliJ and inspect how the plugin handles result types with wildcard extends bounds. Done means the plugin reports an error for this case, with removing the ? extends bound as a possible QuickFix; the payload names no source file or test.

Written by the indexing model from the issue text.

Description

feature hack.commit.push

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 .

Dominant language
Java
Stars
168
Forks
41
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapstruct/mapstruct-idea

All issues in mapstruct/mapstruct-idea

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.