Reputation: 5623
I have written this code in Eclipse (JDK 8.0.20) is compilation JDK.
this.invokeMethod( (Set<MyClass<?>>) vari);
private void invokeMethod(Set<MyClass<?>> vari) throws Exception{
// TODO
}
In eclipse Everything looks well. But when I build it with maven, I have error:
[ERROR] /Path/Test.java:[52,88] incompatible types: java.util.Set<capture#1 of ? extends x.y.z.MyClass<?>> cannot be converted to java.util.Set<x.y.z.MyClass<?>>
Upvotes: 0
Views: 406
Reputation: 43013
You can add those two lines in your pom and check if maven succeeds in compiling:
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
Upvotes: 1