Closed kwin closed 3 years ago
The classes in the the package io.adobe.cloudmanager.model
all extend from their Swagger delegate classes, so they are serializable. Though, the serialVersionUID
was missing and is now added via #28.
The lombok @Delegate
annotation exposes all of the public methods from the delegate class, therefore there should be no reason to ever access the Delegate object itself. Adding the serialVersionUID should solve any persistence issues.
Please let me know if this doesn't in fact, resolve this issue.
This won't work, as the field client
(https://github.com/adobe/aio-lib-java-cloudmanager/blob/1ac71fba9023f953e63ad5bcf0ee4fda2e3c5dca/src/main/java/io/adobe/cloudmanager/model/PipelineExecutionStepState.java#L44) is still not serializable!
It would be good to add a unit test to check that all models are serializable (e.g. by using https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/SerializationUtils.html#serialize-java.io.Serializable-java.io.OutputStream- and https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/SerializationUtils.html#deserialize-java.io.InputStream-)
Although all Swagger model classes are serializable the wrapper classes in
io.adobe.cloudmanager.model
are not. E.g.PipelineExecutionStepState
contains a reference towardsCloudManagerApi
which is not serializable. For all those wrapper classes the delegate should be exposed via a publicgetDelegate()
method, because otherwise consumers cannot get hold of the serializable model instance.