incompatible cannot be converted to java.util.Collection
Answered
hello I have this issue I try to compile my project with Intelij I receive this response :
Error:(39, 74) java: incompatible types: java.util.List<com.esc.projet.entities.Role> cannot be converted to java.util.Collection<? extends org.springframework.security.core.GrantedAuthority>
It for my project but using Eclipse same project work perfectly so after a long time of debug I was able to know that Intelij cant't handle this compilation please try to fix it because I love using Intelij but I'm getting error on the same project diffferent IDE(sorry my English is not so good)
Sincerly
Please sign in to leave a comment.
>Error:(39, 74) java: incompatible types: java.util.List<com.esc.projet.entities.Role> cannot be converted to java.util.Collection<? extends org.springframework.security.core.GrantedAuthority>
This error is generated by java compiler, not IDE. It usually indicates that the code is not correct, nothing that IDE can fix here. If you are using Maven or Gradle in project you can check this by building the project by Maven or Gradle from command line. Do you see the same error?
>It for my project but using Eclipse same project work perfectly
Eclipse uses it's own compiler. In IntelliJ IDA you also can set Eclipse compiler in Java Compiler settings - does it work same as in Eclipse if you set it?