0

I have this code:

public DriverExtensionFactory(
        Class<? extends AbstractNetworkInterface> serviceClass) {
    super((Class<AbstractNetworkInterface>) serviceClass);
}

And it tells me that

Type safety: Unchecked cast from Class<capture#1-of ? extends AbstractNetworkInterface>
to Class<AbstractNetworkInterface>

How should I solve this the correct way?

Thanks!

Edit:

The super class code:

public AbstractExtensionFactory(Class<T> serviceClass) {
    service = serviceClass;
}
PedroD
  • 5,670
  • 12
  • 46
  • 84

0 Answers0