Description
We have been noticed by a bug in this class from spotbugs-maven-plugin. When generating the RFC3339DateFormat class:
[ERROR] Medium:xxxxxxxx.rest.client.invoker.RFC3339DateFormat.clone() does not call super.clone() [xxxxxxxxxx.rest.client.invoker.RFC3339DateFormat] At RFC3339DateFormat.java:[line 53] CN_IDIOM_NO_SUPER_CALL
If I check the class template RFC3339DateFormat.mustache I can see how it is true that the override method clone() does not call super.clone(). It only calls return this;, so it is not cloning the object.
@Override
public Object clone() {
return this;
}
Find the reference to this bug here
openapi-generator version
5.3.0
Suggest a fix/enhancement
Calling super.clone method inside clone() method of RFC3339DateFormat would be enough. I would be happy to contribute if you want.
Description
We have been noticed by a bug in this class from spotbugs-maven-plugin. When generating the RFC3339DateFormat class:
[ERROR] Medium:xxxxxxxx.rest.client.invoker.RFC3339DateFormat.clone() does not call super.clone() [xxxxxxxxxx.rest.client.invoker.RFC3339DateFormat] At RFC3339DateFormat.java:[line 53] CN_IDIOM_NO_SUPER_CALLIf I check the class template RFC3339DateFormat.mustache I can see how it is true that the override method
clone()does not callsuper.clone(). It only callsreturn this;, so it is not cloning the object.Find the reference to this bug here
openapi-generator version
5.3.0
Suggest a fix/enhancement
Calling
super.clonemethod insideclone()method of RFC3339DateFormat would be enough. I would be happy to contribute if you want.