File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/csharp Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -2069,18 +2069,10 @@ private CharSequence generateEnumProperty(
20692069 if (fieldToken .isConstantEncoding ())
20702070 {
20712071 final String constValue = fieldToken .encoding ().constValue ().toString ();
2072-
2072+ final int lastDotIndex = constValue . lastIndexOf ( '.' );
20732073 // If constValue already contains the type prefix (e.g., "filterType.TrailingDelta"),
20742074 // extract just the enum value name
2075- final String enumValue ;
2076- if (constValue .contains ("." ))
2077- {
2078- enumValue = constValue .substring (constValue .lastIndexOf ('.' ) + 1 );
2079- }
2080- else
2081- {
2082- enumValue = constValue ;
2083- }
2075+ final String enumValue = -1 == lastDotIndex ? constValue : constValue .substring (lastDotIndex + 1 );
20842076
20852077 return String .format ("\n " +
20862078 "%1$s" +
You can’t perform that action at this time.
0 commit comments