Skip to content

Commit b05dcfd

Browse files
committed
[Java] Support camelCase enum type identifiers
The type identifier was previously used as-is (e.g. `carType`) in the generated code for enums while generated enums always start with a capital letter (`CarType`).
1 parent 3a7d445 commit b05dcfd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3074,7 +3074,8 @@ private void generateEnumDecoder(
30743074

30753075
if (fieldToken.isConstantEncoding())
30763076
{
3077-
final String enumValueStr = fieldToken.encoding().constValue().toString();
3077+
final String enumValueStr = formatClassName(
3078+
fieldToken.encoding().constValue().toString());
30783079

30793080
new Formatter(sb).format(
30803081
"\n" +

0 commit comments

Comments
 (0)