File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,18 @@ export class JavaDefaultRendererUtil {
3030 if ( property . property . type === 'BigDecimal' ) {
3131 return `private ${ property . property . type } ${ property . propertyName } = new BigDecimal(${ property . property . originalInput . default } );` ;
3232 }
33- if ( property . property instanceof ConstrainedReferenceModel && property . property . ref instanceof ConstrainedEnumModel ) {
34- const defaultEnumValue = property . property . ref . values . find ( valueModel => valueModel . originalInput === property . property . originalInput . default ) ;
33+ if (
34+ property . property instanceof ConstrainedReferenceModel &&
35+ property . property . ref instanceof ConstrainedEnumModel
36+ ) {
37+ const defaultEnumValue = property . property . ref . values . find (
38+ ( valueModel ) =>
39+ valueModel . originalInput === property . property . originalInput . default
40+ ) ;
3541 if ( defaultEnumValue === undefined ) {
3642 return `private ${ property . property . type } ${ property . propertyName } ;` ;
37- } else {
38- return `private ${ property . property . type } ${ property . propertyName } = ${ property . property . type } .${ defaultEnumValue . key } ;` ;
3943 }
44+ return `private ${ property . property . type } ${ property . propertyName } = ${ property . property . type } .${ defaultEnumValue . key } ;` ;
4045 }
4146 return `private ${ property . property . type } ${ property . propertyName } = ${ property . property . originalInput . default } ;` ;
4247 }
You can’t perform that action at this time.
0 commit comments