I tried to compile a still developing project that I got it from sourceforge. this is its address:. https://sourceforge.net/p/groove/code/5475/tree/groove/trunk/ I know that this project is well proved and it doesn't have any error but when I want to compile it, I encounter to this compile error:
error: incompatible types: Class<CAP#1> cannot be converted to Class<List<T>>
this.valueType = (Class<List<T>>) new ArrayList().getClass();
where T is a type-variable:
T extends Object declared in class SplitParser
where CAP#1 is a fresh type-variable:
CAP#1 extends ArrayList from capture of ? extends ArrayList
The error is at this file, line 370: https://sourceforge.net/p/groove/code/5475/tree/groove/trunk/src/groove/util/parse/Parser.java Can anyone help me about this error? I compile this program using java 8, can this be the cause of error?
EDIT: Interestingly project was compiled in Eclipse without error, but still has error in Netbeans with same version of java. Can anyone knows why?
ArrayList.class, and avoid the raw type and the unnecessary object creation. But moreover,ArrayList.classisn't aClass<List>, because it's aClass<ArrayList>. - Andy Turner