diff --git a/pkg/cmd/generate/class.go b/pkg/cmd/generate/class.go index 996fb480..be2f8391 100644 --- a/pkg/cmd/generate/class.go +++ b/pkg/cmd/generate/class.go @@ -436,6 +436,8 @@ func generateJavaModuleColumnSetter[F any](className string, methodName string, switch { case bitwidth == 1: i1Builder.WriteIndentedString(fieldName, ".write(val);\n") + case bitwidth <= 8: + i1Builder.WriteIndentedString(fieldName, ".write((byte) val);\n") case bitwidth <= 63: i1Builder.WriteIndentedString(fieldName, ".write(val);\n") default: diff --git a/pkg/cmd/generate/snippets.go b/pkg/cmd/generate/snippets.go index bee9511f..dbaefcf0 100644 --- a/pkg/cmd/generate/snippets.go +++ b/pkg/cmd/generate/snippets.go @@ -75,6 +75,7 @@ const javaColumn string = ` */ public interface Column { public void write(boolean value); + public void write(byte value); public void write(long value); public void write(byte[] value); }