spring-projects / spring-data-redis

Provides support to increase developer productivity in Java when using Redis, a key-value store. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-redis/
Apache License 2.0
1.77k stars 1.17k forks source link

Cannot infer type arguments when compiling with Eclipse #1983

Closed bergerst closed 3 years ago

bergerst commented 3 years ago

I'm using Eclipse 2020-09 and the following locations produce compiler errors:

https://github.com/spring-projects/spring-data-redis/blob/master/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceScriptingCommands.java#L101L103

https://github.com/spring-projects/spring-data-redis/blob/master/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceScriptingCommands.java#L119L121

https://github.com/spring-projects/spring-data-redis/blob/master/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceConnection.java#L655L656

The compiler messages are:

Cannot infer type argument(s) for <R, T1, T2, T3, T4> from(LettuceInvoker.ConnectionFunction4<T1,T2,T3,T4,R>, T1, T2, T3, T4)
Cannot infer type argument(s) for <R, T1, T2, T3, T4> from(LettuceInvoker.ConnectionFunction4<T1,T2,T3,T4,R>, T1, T2, T3, T4)
Cannot infer type argument(s) for <R, T1, T2, T3> just(LettuceInvoker.ConnectionFunction3<T1,T2,T3,R>, T1, T2, T3)

It compiles just fine using Maven, but not with the Eclipse Java Compiler.

Is there some way to fix this?

mp911de commented 3 years ago

You might report the issue to the ECJ issue tracker so they can have a look.