@@ -1023,7 +1023,7 @@ private void generateComposite(final List<Token> tokens) throws IOException
10231023 final String implementsString = implementsInterface (GEN_COMPOSITE_DECODER_FLYWEIGHT );
10241024 generateCompositeFlyweightHeader (token , decoderName , out , readOnlyBuffer , fqReadOnlyBuffer , implementsString );
10251025
1026- for (int i = 1 , end = tokens .size () - 1 ; i < end ; i ++ )
1026+ for (int i = 1 , end = tokens .size () - 1 ; i < end ;)
10271027 {
10281028 final Token encodingToken = tokens .get (i );
10291029 final String propertyName = formatPropertyName (encodingToken .name ());
@@ -1053,9 +1053,10 @@ private void generateComposite(final List<Token> tokens) throws IOException
10531053 case BEGIN_COMPOSITE :
10541054 out .append (sb );
10551055 out .append (generateCompositeProperty (true , DECODER , propertyName , encodingToken , BASE_INDENT , typeName ));
1056- i += encodingToken .componentTokenCount ();
10571056 break ;
10581057 }
1058+
1059+ i += encodingToken .componentTokenCount ();
10591060 }
10601061
10611062 out .append (generateCompositeDecoderDisplay (tokens , BASE_INDENT ));
@@ -1068,7 +1069,7 @@ private void generateComposite(final List<Token> tokens) throws IOException
10681069 final String implementsString = implementsInterface (GEN_COMPOSITE_ENCODER_FLYWEIGHT );
10691070 generateCompositeFlyweightHeader (token , encoderName , out , mutableBuffer , fqMutableBuffer , implementsString );
10701071
1071- for (int i = 1 , end = tokens .size () - 1 ; i < end ; i ++ )
1072+ for (int i = 1 , end = tokens .size () - 1 ; i < end ;)
10721073 {
10731074 final Token encodingToken = tokens .get (i );
10741075 final String propertyName = formatPropertyName (encodingToken .name ());
@@ -1098,9 +1099,10 @@ private void generateComposite(final List<Token> tokens) throws IOException
10981099 case BEGIN_COMPOSITE :
10991100 out .append (sb );
11001101 out .append (generateCompositeProperty (true , ENCODER , propertyName , encodingToken , BASE_INDENT , typeName ));
1101- i += encodingToken .componentTokenCount ();
11021102 break ;
11031103 }
1104+
1105+ i += encodingToken .componentTokenCount ();
11041106 }
11051107
11061108 out .append (generateCompositeEncoderDisplay (decoderName , BASE_INDENT ));
@@ -2169,10 +2171,10 @@ private static void generateEncodingOffsetMethod(
21692171 {
21702172 sb .append (String .format (
21712173 "\n " +
2172- indent + " public static int %sEncodingOffset()\n " +
2173- indent + " {\n " +
2174- indent + " return %d;\n " +
2175- indent + " }\n " ,
2174+ indent + " public static int %sEncodingOffset()\n " +
2175+ indent + " {\n " +
2176+ indent + " return %d;\n " +
2177+ indent + " }\n " ,
21762178 formatPropertyName (name ),
21772179 offset ));
21782180 }
@@ -2182,10 +2184,10 @@ private static void generateEncodingLengthMethod(
21822184 {
21832185 sb .append (String .format (
21842186 "\n " +
2185- indent + " public static int %sEncodingLength()\n " +
2186- indent + " {\n " +
2187- indent + " return %d;\n " +
2188- indent + " }\n " ,
2187+ indent + " public static int %sEncodingLength()\n " +
2188+ indent + " {\n " +
2189+ indent + " return %d;\n " +
2190+ indent + " }\n " ,
21892191 formatPropertyName (name ),
21902192 length ));
21912193 }
@@ -2194,10 +2196,10 @@ private static void generateFieldSinceVersionMethod(final StringBuilder sb, fina
21942196 {
21952197 sb .append (String .format (
21962198 "\n " +
2197- indent + " public static int %sSinceVersion()\n " +
2198- indent + " {\n " +
2199- indent + " return %d;\n " +
2200- indent + " }\n " ,
2199+ indent + " public static int %sSinceVersion()\n " +
2200+ indent + " {\n " +
2201+ indent + " return %d;\n " +
2202+ indent + " }\n " ,
22012203 formatPropertyName (token .name ()),
22022204 token .version ()));
22032205 }
@@ -2580,7 +2582,7 @@ private CharSequence generateCompositeDecoderDisplay(final List<Token> tokens, f
25802582
25812583 int lengthBeforeLastGeneratedSeparator = -1 ;
25822584
2583- for (int i = 1 , end = tokens .size () - 1 ; i < end ; )
2585+ for (int i = 1 , end = tokens .size () - 1 ; i < end ;)
25842586 {
25852587 final Token encodingToken = tokens .get (i );
25862588 final String propertyName = formatPropertyName (encodingToken .name ());
@@ -2629,8 +2631,7 @@ private CharSequence generateChoiceDisplay(final List<Token> tokens)
26292631 append (sb , indent , " builder.append(\" " + choiceName + "\" );" );
26302632 append (sb , indent , " atLeastOne = true;" );
26312633 append (sb , indent , " }" );
2632- }
2633- );
2634+ });
26342635
26352636 Separators .END_SET .appendToGeneratedBuilder (sb , indent + INDENT , "builder" );
26362637 sb .append ('\n' );
0 commit comments