Description
The generated RFC3339DateFormat.clone() method defers to super.clone(), but the numberFormat field has not been initialized in the RFC3339DateFormat constructor, and so DateFormat.clone() raises a NullPointerException.
Full comment on #11311 (comment)
openapi-generator version
5.4.0
Suggest a fix
Amend modules/openapi-generator/src/main/resources/Java/RFC3339DateFormat.mustache constructor to:
public RFC3339DateFormat() {
this.calendar = new GregorianCalendar();
this.numberFormat = new DecimalFormat();
}
Description
The generated
RFC3339DateFormat.clone()method defers tosuper.clone(), but thenumberFormatfield has not been initialized in theRFC3339DateFormatconstructor, and soDateFormat.clone()raises a NullPointerException.Full comment on #11311 (comment)
openapi-generator version
5.4.0
Suggest a fix
Amend
modules/openapi-generator/src/main/resources/Java/RFC3339DateFormat.mustacheconstructor to: