Skip to content

Fix parameter type checks for parameters with a specific parent type. #267

@xterao

Description

@xterao

Describe the bug
In methods annotated with @select, when using STREAM or COLLECT options, parameters of type Function, Collector, or their subtypes are currently being reported as unused parameters, even though they should not be considered an error if they are not used in the SQL statement.
To Reproduce

    @Select(strategy = SelectType.COLLECT)
    @Sql("select * from emp where salary > /* salary */0")
    Emp selectHogeCollector(BigDecimal salary ,HogeCollector collector);

   public class HogeCollector implements Collector<String, String, String> {
  // overrides 
  }

Expected behavior
Parameters of type Function, Collector, or their subtypes should be excluded from unused parameter error checks when STREAM or COLLECT options are specified on @select methods, even if those parameters are not referenced in the SQL.

Screenshots

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions