Hi I have some initialization as below.... it is showing error in eclipse as type mismatch. if i compile using maven through command prompt, it compiles without any error.. using eclipse luna, and compiler set to java 1.7.
ReportData<Object> rdata = null;
rdata = new ReportData<>(reportCtx.get()); // error shown for this line in //eclipse.
ReportData<T>{
private T val;
public ReportData(T val){
this.val=val;
}
}
I am not understanding, why eclipse show error for this and how it compiles in maven with the same java 1.7. whats wrong with rdata = new ReportData<>(reportCtx.get());
initialization.