For some custom infrastructure, I'm trying to leverage the GenericConversionService
by creating specialized subinterfaces of Converter
and wiring up my consuming service by type:
interface IdExtractor<E, I extends Serializable> extends Converter<E, I> {}
interface GenericResource {
String getId();
class Extractor implements IdExtractor<GenericResource, String> {
@Override String convert(GenericResource s) { return s.getId(); }
}
}
This, however, produces a conversion-time error saying that the service could not determine the generic types: "does the class parameterize those types?"
This appears to be because the service does not introspect through the subinterface, but the types are in fact strongly bound.
Comment From: snicoll
Thanks for the report but, rather than us guessing based on a code snippet in text and a substring of an exception message, could you please create a small sample that we can run ourselves to reproduce the exception? You can do so by attaching a zip to this issue or pushing the code to a separate GitHub repository.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.