forked from loafle/openapi-generator-original
Fix issue5425 (#5483)
* issue 5425 : [Android] Bug generating parcelables constructors for custom classes ( missing getClassLoader() ) * issue 5425 : changes in generated code * ran ./bin/java-petstore-all.sh and committed the changes
This commit is contained in:
@@ -178,17 +178,12 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
|
||||
{{classname}}(Parcel in) {
|
||||
{{#parent}} super(in); {{/parent}}
|
||||
{{#vars}}
|
||||
{{#isContainer}}
|
||||
{{#complexType}}
|
||||
{{#isPrimitiveType}}
|
||||
{{name}} = ({{{datatypeWithEnum}}})in.readValue(null);
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
{{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader());
|
||||
{{/complexType}}
|
||||
{{^complexType}}
|
||||
{{name}} = ({{{datatypeWithEnum}}})in.readValue(null);
|
||||
{{/complexType}}
|
||||
{{/isContainer}}
|
||||
{{^isContainer}}
|
||||
{{name}} = ({{{datatypeWithEnum}}})in.readValue(null);
|
||||
{{/isContainer}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/vars}}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user