File tree Expand file tree Collapse file tree
codegen/src/main/java/org/web3j/codegen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -416,16 +416,15 @@ PropertySpec createBinaryDefinition(String binary) {
416416 }
417417
418418 String [] argsArray = binary .split ("(?<=\\ G.{65534})" );
419- StringBuilder stringBuilderString = new StringBuilder ().append ("new StringBuilder()" );
419+ StringBuilder stringBuilderString = new StringBuilder ().append ("StringBuilder()" );
420420 for (String s : argsArray ) {
421421 stringBuilderString .append (".append(\" " );
422422 stringBuilderString .append (
423423 s .replaceAll ("\\ $" , "\\ $\\ $" )); // escape $ which bytecode may contain
424424 stringBuilderString .append ("\" )" );
425425 }
426426 stringBuilderString .append (".toString()" );
427- return PropertySpec .builder ( BINARY , String .class )
428- .addModifiers (KModifier .PUBLIC , KModifier .FINAL , KModifier .FINAL )
427+ return PropertySpec .builder ( BINARY , ClassName .bestGuess ("kotlin.String" ))
429428 .initializer (CodeBlock .of (stringBuilderString .toString ()))
430429 .build ();
431430 }
You can’t perform that action at this time.
0 commit comments