Skip to content

Commit 4b64c6f

Browse files
committed
[Java] Apply strict indentation checkstyle rule.
1 parent ef61b67 commit 4b64c6f

27 files changed

+670
-756
lines changed

config/checkstyle/checkstyle.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323

2424
<module name="SuppressWarningsHolder"/>
2525

26-
<module name="Indentation"/>
26+
<module name="Indentation">
27+
<property name="forceStrictCondition" value="true"/>
28+
</module>
2729

2830
<module name="ConstantName"/>
2931

sbe-samples/src/main/java/uk/co/real_logic/sbe/examples/ExampleUsingGeneratedStub.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ public static int encode(
133133
.next().speed(55).mpg(49.0f).usageDescription("Combined Cycle")
134134
.next().speed(75).mpg(40.0f).usageDescription("Highway Cycle");
135135

136-
final CarEncoder.PerformanceFiguresEncoder perfFigures = car.performanceFiguresCount(2);
137-
perfFigures.next()
136+
final CarEncoder.PerformanceFiguresEncoder figures = car.performanceFiguresCount(2);
137+
figures.next()
138138
.octaneRating((short)95)
139139
.accelerationCount(3)
140140
.next().mph(30).seconds(4.0f)
141141
.next().mph(60).seconds(7.5f)
142142
.next().mph(100).seconds(12.2f);
143-
perfFigures.next()
143+
figures.next()
144144
.octaneRating((short)99)
145145
.accelerationCount(3)
146146
.next().mph(30).seconds(3.8f)

sbe-samples/src/main/java/uk/co/real_logic/sbe/examples/ExampleUsingGeneratedStubExtension.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ public static int encode(
138138
.next().speed(55).mpg(49.0f).usageDescription("Combined Cycle")
139139
.next().speed(75).mpg(40.0f).usageDescription("Highway Cycle");
140140

141-
final baseline.CarEncoder.PerformanceFiguresEncoder perfFigures = car.performanceFiguresCount(2);
142-
perfFigures.next()
141+
final baseline.CarEncoder.PerformanceFiguresEncoder figures = car.performanceFiguresCount(2);
142+
figures.next()
143143
.octaneRating((short)95)
144144
.accelerationCount(3)
145145
.next().mph(30).seconds(4.0f)
146146
.next().mph(60).seconds(7.5f)
147147
.next().mph(100).seconds(12.2f);
148-
perfFigures.next()
148+
figures.next()
149149
.octaneRating((short)99)
150150
.accelerationCount(3)
151151
.next().mph(30).seconds(3.8f)
@@ -235,13 +235,11 @@ public static void decode(
235235
}
236236
}
237237

238-
sb.append("\ncar.manufacturer=").append(
239-
new String(buffer, 0, car.getManufacturer(
240-
buffer, 0, buffer.length), extension.CarEncoder.manufacturerCharacterEncoding()));
238+
sb.append("\ncar.manufacturer=").append(new String(buffer, 0, car.getManufacturer(
239+
buffer, 0, buffer.length), extension.CarEncoder.manufacturerCharacterEncoding()));
241240

242-
sb.append("\ncar.model=").append(
243-
new String(buffer, 0, car.getModel(
244-
buffer, 0, buffer.length), extension.CarEncoder.modelCharacterEncoding()));
241+
sb.append("\ncar.model=").append(new String(buffer, 0, car.getModel(
242+
buffer, 0, buffer.length), extension.CarEncoder.modelCharacterEncoding()));
245243

246244
final UnsafeBuffer tempBuffer = new UnsafeBuffer(buffer);
247245
final int tempBufferLength = car.getActivationCode(tempBuffer, 0, tempBuffer.capacity());

sbe-tool/src/main/java/uk/co/real_logic/sbe/SbeTool.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,11 @@ public static void validateAgainstSchema(final String sbeSchemaFilename, final S
261261
public static MessageSchema parseSchema(final String sbeSchemaFilename)
262262
throws Exception
263263
{
264-
final ParserOptions.Builder optionsBuilder =
265-
ParserOptions
266-
.builder()
267-
.xsdFilename(System.getProperty(VALIDATION_XSD))
268-
.stopOnError(Boolean.parseBoolean(System.getProperty(VALIDATION_STOP_ON_ERROR)))
269-
.warningsFatal(Boolean.parseBoolean(System.getProperty(VALIDATION_WARNINGS_FATAL)))
270-
.suppressOutput(Boolean.parseBoolean(System.getProperty(VALIDATION_SUPPRESS_OUTPUT)));
264+
final ParserOptions.Builder optionsBuilder = ParserOptions.builder()
265+
.xsdFilename(System.getProperty(VALIDATION_XSD))
266+
.stopOnError(Boolean.parseBoolean(System.getProperty(VALIDATION_STOP_ON_ERROR)))
267+
.warningsFatal(Boolean.parseBoolean(System.getProperty(VALIDATION_WARNINGS_FATAL)))
268+
.suppressOutput(Boolean.parseBoolean(System.getProperty(VALIDATION_SUPPRESS_OUTPUT)));
271269

272270
try (InputStream in = new BufferedInputStream(Files.newInputStream(Paths.get(sbeSchemaFilename))))
273271
{

0 commit comments

Comments
 (0)