Skip to content

Commit c011057

Browse files
committed
Eliminated garbage produced in appendTo for set-based fields to allow full GC-free logging of decoders
1 parent 1af4e28 commit c011057

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/java/JavaGenerator.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3393,10 +3393,13 @@ private int writeTokenDisplay(
33933393
break;
33943394

33953395
case BEGIN_ENUM:
3396-
case BEGIN_SET:
33973396
append(sb, indent, "builder.append(" + fieldName + "());");
33983397
break;
33993398

3399+
case BEGIN_SET:
3400+
append(sb, indent, fieldName + "().appendTo(builder);");
3401+
break;
3402+
34003403
case BEGIN_COMPOSITE:
34013404
{
34023405
final String typeName = formatClassName(decoderName(typeToken.applicableTypeName()));

0 commit comments

Comments
 (0)