Skip to content

Commit 2f6a58b

Browse files
committed
[Java] Fix warnings.
1 parent 80b8e8b commit 2f6a58b

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public EnumType(final Node node, final String givenName, final String referenced
8787
default:
8888
// might not have ran into this type yet, so look for it
8989
final Node encodingTypeNode = (Node)xPath.compile(
90-
String.format("%s[@name=\'%s\']", XmlSchemaParser.TYPE_XPATH_EXPR, encodingTypeStr))
90+
String.format("%s[@name='%s']", XmlSchemaParser.TYPE_XPATH_EXPR, encodingTypeStr))
9191
.evaluate(node.getOwnerDocument(), XPathConstants.NODE);
9292

9393
if (null == encodingTypeNode)

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -341,17 +341,12 @@ public static String getAttributeValueOrNull(final Node elementNode, final Strin
341341
*/
342342
public static ByteOrder getByteOrder(final String byteOrderName)
343343
{
344-
switch (byteOrderName)
344+
if ("bigEndian".equals(byteOrderName))
345345
{
346-
case "littleEndian":
347-
return ByteOrder.LITTLE_ENDIAN;
348-
349-
case "bigEndian":
350-
return ByteOrder.BIG_ENDIAN;
351-
352-
default:
353-
return ByteOrder.LITTLE_ENDIAN;
346+
return ByteOrder.BIG_ENDIAN;
354347
}
348+
349+
return ByteOrder.LITTLE_ENDIAN;
355350
}
356351

357352
/**

0 commit comments

Comments
 (0)