Hi Guys:
The following class (BirtReportDatasourceProviderHooker.java):
public class BirtReportDatasourceProviderHooker implements
DatasourceProviderHook {
@Override
public Collection<? extends Class<? extends DatasourceDefinition>> getDatasources() {
return (Collection<? extends Class<? extends DatasourceDefinition>>) Arrays.asList(new Class[]{BirtReportDatasourceDefinition.class});
}
}
In eclipse I get a type safety warning - no issue. When I use javac to compile the class javac throws an “incompatible types” error. I’m using Oracle JavaSE 1.7.0_17. I’ve Googled some issues about the Java compiler not understanding bounds while trying to compile generics. Is there a slightly different way we could write the class to make javac happy?
Cheers,
Dave