Skip to content

Commit 235d625

Browse files
committed
fix handling of bytes in trace generator
This tweaks the handling of bytes within the trace generator. Whilst these were being handled correctly, the mechanism was presenting a problem for the new LtFileV2 format used within the tracer.
1 parent 76ae5f6 commit 235d625

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pkg/cmd/generate/class.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ func generateJavaModuleColumnSetter[F any](className string, methodName string,
436436
switch {
437437
case bitwidth == 1:
438438
i1Builder.WriteIndentedString(fieldName, ".write(val);\n")
439+
case bitwidth <= 8:
440+
i1Builder.WriteIndentedString(fieldName, ".write((byte) val);\n")
439441
case bitwidth <= 63:
440442
i1Builder.WriteIndentedString(fieldName, ".write(val);\n")
441443
default:

pkg/cmd/generate/snippets.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ const javaColumn string = `
7575
*/
7676
public interface Column {
7777
public void write(boolean value);
78+
public void write(byte value);
7879
public void write(long value);
7980
public void write(byte[] value);
8081
}

0 commit comments

Comments
 (0)