Skip to content

Commit

Permalink
[Java] Support camelCase enum type identifiers
Browse files Browse the repository at this point in the history
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`).
  • Loading branch information
pliard committed Nov 27, 2023
1 parent 3a7d445 commit b05dcfd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3074,7 +3074,8 @@ private void generateEnumDecoder(

if (fieldToken.isConstantEncoding())
{
final String enumValueStr = fieldToken.encoding().constValue().toString();
final String enumValueStr = formatClassName(
fieldToken.encoding().constValue().toString());

new Formatter(sb).format(
"\n" +
Expand Down

0 comments on commit b05dcfd

Please sign in to comment.