While working on Spring Framework 6.2.0-SNAPSHOT, this lead to a problem due to our revised generics handling that was very helpful and the code as it is now works as expected thanks to https://github.com/spring-projects/spring-framework/issues/32327.
However, since the redundant declaration does not bring any added value, I am submitted the change anyway. It works as is with both Spring Framework 6.1 and 6.2.