Add fall through comments for switch statement
@@ -557,7 +557,6 @@ public final class DateTimeUtils
List<PeriodParser> parsers = new ArrayList<>();
PeriodFormatterBuilder builder = new PeriodFormatterBuilder();
- //CHECKSTYLE.OFF
switch (startField) {
case YEAR:
builder.appendYears();
@@ -566,6 +565,8 @@ public final class DateTimeUtils
break;
}
builder.appendLiteral("-");
+ // fall through
+
case MONTH:
builder.appendMonths();
parsers.add(builder.toParser());
@@ -581,6 +582,7 @@ public final class DateTimeUtils
break;
}
builder.appendLiteral(" ");
+ // fall through
case HOUR:
builder.appendHours();
@@ -589,6 +591,7 @@ public final class DateTimeUtils
break;
}
builder.appendLiteral(":");
+ // fall through
case MINUTE:
builder.appendMinutes();
@@ -597,12 +600,13 @@ public final class DateTimeUtils
break;
}
builder.appendLiteral(":");
+ // fall through
case SECOND:
builder.appendSecondsWithOptionalMillis();
parsers.add(builder.toParser());
+ break;
}
- //CHECKSTYLE.ON
return new PeriodFormatter(builder.toPrinter(), new OrderedPeriodParser(parsers));
}
