我有这段代码:
public DriverExtensionFactory(
Class<? extends AbstractNetworkInterface> serviceClass) {
super((Class<AbstractNetworkInterface>) serviceClass);
}
它告诉我
Type safety: Unchecked cast from Class<capture#1-of ? extends AbstractNetworkInterface>
to Class<AbstractNetworkInterface>
我该如何以正确的方式解决这个问题?
谢谢!
修改
超类代码:
public AbstractExtensionFactory(Class<T> serviceClass) {
service = serviceClass;
}