Skip to content

Commit 19a6a34

Browse files
committed
[Java] Consistent use of System properties.
1 parent aa9aa61 commit 19a6a34

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public CodeGenerator newInstance(final Ir ir, final String outputDir)
4747
ir,
4848
System.getProperty(JAVA_ENCODING_BUFFER_TYPE, JAVA_DEFAULT_ENCODING_BUFFER_TYPE),
4949
System.getProperty(JAVA_DECODING_BUFFER_TYPE, JAVA_DEFAULT_DECODING_BUFFER_TYPE),
50-
Boolean.getBoolean(JAVA_GROUP_ORDER_ANNOTATION),
51-
Boolean.getBoolean(JAVA_GENERATE_INTERFACES),
52-
Boolean.getBoolean(DECODE_UNKNOWN_ENUM_VALUES),
50+
"true".equals(System.getProperty(JAVA_GROUP_ORDER_ANNOTATION)),
51+
"true".equals(System.getProperty(JAVA_GENERATE_INTERFACES)),
52+
"true".equals(System.getProperty(DECODE_UNKNOWN_ENUM_VALUES)),
5353
new PackageOutputManager(outputDir, ir.applicableNamespace()));
5454
}
5555
},
@@ -80,7 +80,7 @@ public CodeGenerator newInstance(final Ir ir, final String outputDir)
8080
{
8181
return new CppGenerator(
8282
ir,
83-
Boolean.getBoolean(DECODE_UNKNOWN_ENUM_VALUES),
83+
"true".equals(System.getProperty(DECODE_UNKNOWN_ENUM_VALUES)),
8484
new NamespaceOutputManager(outputDir, ir.applicableNamespace()));
8585
}
8686
},

sbe-tool/src/main/java/uk/co/real_logic/sbe/ir/Ir.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public Ir(
7979

8080
captureTypes(headerTokens, 0, headerTokens.size() - 1);
8181

82-
if (Boolean.getBoolean(SbeTool.CPP_NAMESPACES_COLLAPSE))
82+
if ("true".equals(System.getProperty(SbeTool.CPP_NAMESPACES_COLLAPSE)))
8383
{
8484
this.namespaces = new String[]{ (namespaceName == null ? packageName : namespaceName).replace(".", "_") };
8585
}

sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/CompositeType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ else if (primitiveType == UINT32)
302302
*/
303303
public void checkForWellFormedMessageHeader(final Node node)
304304
{
305-
final boolean shouldGenerateInterfaces = Boolean.getBoolean(JAVA_GENERATE_INTERFACES);
305+
final boolean shouldGenerateInterfaces = "true".equals(System.getProperty(JAVA_GENERATE_INTERFACES));
306306

307307
final EncodedDataType blockLengthType = (EncodedDataType)containedTypeByNameMap.get("blockLength");
308308
final EncodedDataType templateIdType = (EncodedDataType)containedTypeByNameMap.get("templateId");

0 commit comments

Comments
 (0)