File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,9 @@ public ${name}(`;
5858 }
5959 if ( Object . hasOwn ( entry , "default" ) ) {
6060 code += `
61- this.${ key } = Object.requireNonNullElse(${ key } ,${ getDefault ( entry ) } );` ;
61+ this.${ key } = java.util.Objects.requireNonNullElse(${ key } ,${ getDefault (
62+ entry
63+ ) } );`;
6264 } else {
6365 code += `
6466 this.${ key } = ${ key } ;` ;
@@ -113,7 +115,9 @@ public ${name}(`;
113115 }
114116 if ( Object . hasOwn ( entry , "default" ) ) {
115117 code += `
116- this.${ key } = Object.requireNonNullElse(${ key } ,${ getDefault ( entry ) } );` ;
118+ this.${ key } = java.util.Objects.requireNonNullElse(${ key } ,${ getDefault (
119+ entry
120+ ) } );`;
117121 } else {
118122 code += `
119123 this.${ key } = ${ key } ;` ;
@@ -125,7 +129,7 @@ public ${name}(`;
125129 ` ;
126130 for ( const [ key , entry ] of props ) {
127131 code += `
128- public ${ getType ( entry , suffixNs ) } get ${ firstLetterUpperCase ( key ) } () {
132+ public ${ getType ( entry , suffixNs ) } ${ key } () {
129133 return ${ key } ;
130134}
131135 ` ;
@@ -174,7 +178,7 @@ public interface ${name} {
174178 ` ;
175179 for ( const [ key , entry ] of Object . entries ( properties ) ) {
176180 code += `
177- ${ getType ( entry , suffixNs ) } get ${ firstLetterUpperCase ( key ) } ();
181+ ${ getType ( entry , suffixNs ) } ${ key } ();
178182 ` ;
179183 }
180184
You can’t perform that action at this time.
0 commit comments