Skip to content

Commit cbab490

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # build.gradle
2 parents 2687865 + 08455ec commit cbab490

File tree

15 files changed

+105
-145
lines changed

15 files changed

+105
-145
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def projectPom = {
8686
}
8787

8888
task wrapper(type: Wrapper) {
89-
gradleVersion = '2.14.1'
89+
gradleVersion = '3.1'
9090
}
9191

9292
configurations {
@@ -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 {

gradle/wrapper/gradle-wrapper.jar

-396 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Aug 14 20:15:26 BST 2016
1+
#Sat Sep 24 20:31:48 BST 2016
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip

gradlew

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,9 @@ function splitJvmOpts() {
161161
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162162
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163163

164+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
165+
if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then
166+
cd "$(dirname "$0")"
167+
fi
168+
164169
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

gradlew.bat

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ goto fail
4949
@rem Get command-line arguments, handling Windows variants
5050

5151
if not "%OS%" == "Windows_NT" goto win9xME_args
52-
if "%@eval[2+2]" == "4" goto 4NT_args
5352

5453
:win9xME_args
5554
@rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
6059
if "x%~1" == "x" goto execute
6160

6261
set CMD_LINE_ARGS=%*
63-
goto execute
64-
65-
:4NT_args
66-
@rem Get arguments from the 4NT Shell from JP Software
67-
set CMD_LINE_ARGS=%$
6862

6963
:execute
7064
@rem Setup the command line

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)