File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/java Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -3269,7 +3269,16 @@ private void appendDecoderDisplay(
3269
3269
}
3270
3270
else
3271
3271
{
3272
- append (sb , indent , "builder.append('\\ '').append(" + varDataName + "()).append('\\ '');" );
3272
+ if (characterEncoding .contains ("ASCII" ))
3273
+ {
3274
+ append (sb , indent , "builder.append('\\ '');" );
3275
+ append (sb , indent , formatGetterName (varDataToken .name ()) + "(builder);" );
3276
+ append (sb , indent , "builder.append('\\ '');" );
3277
+ }
3278
+ else
3279
+ {
3280
+ append (sb , indent , "builder.append('\\ '').append(" + varDataName + "()).append('\\ '');" );
3281
+ }
3273
3282
}
3274
3283
3275
3284
lengthBeforeLastGeneratedSeparator = sb .length ();
Original file line number Diff line number Diff line change @@ -158,6 +158,18 @@ public static String formatPropertyName(final String value)
158
158
return formattedValue ;
159
159
}
160
160
161
+ /**
162
+ * Format a Getter name for generated code.
163
+ * <p>
164
+ *
165
+ * @param value to be formatted.
166
+ * @return the string formatted as a getter name.
167
+ */
168
+ public static String formatGetterName (final String value )
169
+ {
170
+ return "get" + Generators .toUpperFirstChar (value );
171
+ }
172
+
161
173
/**
162
174
* Format a class name for the generated code.
163
175
*
You can’t perform that action at this time.
0 commit comments