Skip to content

Commit e0f83c6

Browse files
committed
[Java] Upgrade to Checkstyle 7.1.1.
1 parent c056de2 commit e0f83c6

File tree

10 files changed

+87
-126
lines changed

10 files changed

+87
-126
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ subprojects {
115115
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
116116

117117
dependencies {
118-
checkstyle 'com.puppycrawl.tools:checkstyle:7.0'
118+
checkstyle 'com.puppycrawl.tools:checkstyle:7.1.1'
119119
checkstyle 'com.github.sevntu.checkstyle:sevntu-checks:1.21.0'
120120

121121
testCompile 'org.hamcrest:hamcrest-all:1.3'
@@ -126,7 +126,7 @@ subprojects {
126126

127127
checkstyle {
128128
configFile = new File(rootDir, 'config/checkstyle.xml')
129-
toolVersion = '7.0'
129+
toolVersion = '7.1.1'
130130
}
131131

132132
compileJava {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static void main(final String[] args) throws Exception
8282
final String encodingFilename = System.getProperty(ENCODING_FILENAME);
8383
if (encodingFilename != null)
8484
{
85-
try (final FileChannel channel = new FileOutputStream(encodingFilename).getChannel())
85+
try (FileChannel channel = new FileOutputStream(encodingFilename).getChannel())
8686
{
8787
byteBuffer.limit(encodingLength);
8888
channel.write(byteBuffer);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static void main(final String[] args) throws Exception
8383
final String encodingFilename = System.getProperty(ENCODING_FILENAME);
8484
if (encodingFilename != null)
8585
{
86-
try (final FileChannel channel = new FileOutputStream(encodingFilename).getChannel())
86+
try (FileChannel channel = new FileOutputStream(encodingFilename).getChannel())
8787
{
8888
byteBuffer.limit(encodingLength);
8989
channel.write(byteBuffer);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ public static void main(final String[] args) throws Exception
9393

9494
private static void encodeSchema(final ByteBuffer byteBuffer) throws Exception
9595
{
96-
try (final InputStream in = new FileInputStream("src/main/resources/example-schema.xml"))
96+
try (InputStream in = new FileInputStream("src/main/resources/example-schema.xml"))
9797
{
9898
final MessageSchema schema = XmlSchemaParser.parse(in, ParserOptions.DEFAULT);
9999
final Ir ir = new IrGenerator().generate(schema);
100-
try (final IrEncoder irEncoder = new IrEncoder(byteBuffer, ir))
100+
try (IrEncoder irEncoder = new IrEncoder(byteBuffer, ir))
101101
{
102102
irEncoder.encode();
103103
}
@@ -125,7 +125,7 @@ private static void encodeTestMessage(final ByteBuffer byteBuffer)
125125

126126
private static Ir decodeIr(final ByteBuffer buffer) throws IOException
127127
{
128-
try (final IrDecoder irDecoder = new IrDecoder(buffer))
128+
try (IrDecoder irDecoder = new IrDecoder(buffer))
129129
{
130130
return irDecoder.decode();
131131
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ else if (fileName.endsWith(".sbeir"))
205205

206206
final File fullPath = new File(outputDirName, namePart + ".sbeir");
207207

208-
try (final IrEncoder irEncoder = new IrEncoder(fullPath.getAbsolutePath(), ir))
208+
try (IrEncoder irEncoder = new IrEncoder(fullPath.getAbsolutePath(), ir))
209209
{
210210
irEncoder.encode();
211211
}
@@ -223,7 +223,7 @@ else if (fileName.endsWith(".sbeir"))
223223
public static void validateAgainstSchema(final String sbeSchemaFilename, final String xsdFilename)
224224
throws Exception
225225
{
226-
try (final BufferedInputStream in = new BufferedInputStream(new FileInputStream(sbeSchemaFilename)))
226+
try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(sbeSchemaFilename)))
227227
{
228228
XmlSchemaParser.validate(xsdFilename, in);
229229
}
@@ -247,7 +247,7 @@ public static MessageSchema parseSchema(final String sbeSchemaFilename)
247247
.warningsFatal(Boolean.parseBoolean(System.getProperty(VALIDATION_WARNINGS_FATAL)))
248248
.suppressOutput(Boolean.parseBoolean(System.getProperty(VALIDATION_SUPPRESS_OUTPUT)));
249249

250-
try (final BufferedInputStream in = new BufferedInputStream(new FileInputStream(sbeSchemaFilename)))
250+
try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(sbeSchemaFilename)))
251251
{
252252
return XmlSchemaParser.parse(in, optionsBuilder.build());
253253
}

sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/TargetCodeGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public CodeGenerator newInstance(final Ir ir, final String outputDir) throws IOE
6161
* @return a new instance of a {@link CodeGenerator} for the given target language.
6262
* @throws IOException if an error occurs when dealing with the output directory.
6363
*/
64-
public abstract CodeGenerator newInstance(final Ir ir, final String outputDir) throws IOException;
64+
public abstract CodeGenerator newInstance(Ir ir, String outputDir) throws IOException;
6565

6666
/**
6767
* Do a case insensitive lookup of a target language for code generation.

0 commit comments

Comments
 (0)