softlayer-java
softlayer-java copied to clipboard
com.softlayer.api.service.software.component.security.SafeNet needs to inherit from OperatingSystem
When getting a list of operating systems from the API, if a safenet (HSM) type device is in the list, the following error will be present.
Expecting class com.softlayer.api.service.software.component.OperatingSystem to be super type of class com.softlayer.api.service.software.component.security.SafeNet
https://sldn.softlayer.com/reference/datatypes/SoftLayer_Software_Component_Security_SafeNet/ should inherit from the OperatingSystem, but is instead inherits from the Security Class.
The workaround I think we can do is to return as common a supertype as we can derive from both the expected and actual types.
Well, we obviously can't use a common supertype 😄 that violates the existing contracts. Instead, allow coercing the returned object into the type that's defined.