Open
Description
Currently ConvertWith
only applies to a single parameter, so, a method using the same converter more than once becomes extremely verbose.
void testMostVisitedPattern(
@ConvertWith(IterableConverter.class) String[] username,
@ConvertWith(IterableConverter.class) int[] timestamp,
@ConvertWith(IterableConverter.class) String[] website,
@ConvertWith(IterableConverter.class) List<String> expected) {...}
Deliverables
- Make
ConvertWith
applicable to a method such that if no other converter is found or specified for a parameter, the method-level converter will be used. - Alternatively, provide a way to register converters globally, akin to what the Spring Framework does.