Skip to content

Commit 963814f

Browse files
committed
[Java] Make methods static that can be.
1 parent ea718e7 commit 963814f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public Message(final Node messageNode, final Map<String, Type> typeByNameMap) th
7878
fieldList = parseFieldsAndGroups(messageNode);
7979
computeAndValidateOffsets(messageNode, fieldList, blockLength);
8080

81-
computedBlockLength = computeMessageRootBlockLength();
81+
computedBlockLength = computeMessageRootBlockLength(fieldList);
8282
validateBlockLength(messageNode, blockLength, computedBlockLength);
8383
}
8484

@@ -348,7 +348,7 @@ else if (!(fieldType instanceof CompositeType))
348348
* Will validate the blockLength of the fields encompassing &lt;message&gt; or &lt;group&gt; and recursively
349349
* descend into repeated groups.
350350
*/
351-
private int computeAndValidateOffsets(final Node node, final List<Field> fields, final int blockLength)
351+
private static int computeAndValidateOffsets(final Node node, final List<Field> fields, final int blockLength)
352352
{
353353
boolean variableLengthBlock = false;
354354
int offset = 0;
@@ -406,11 +406,11 @@ else if (null != field.type() && Presence.CONSTANT != field.presence())
406406
return offset;
407407
}
408408

409-
private int computeMessageRootBlockLength()
409+
private static int computeMessageRootBlockLength(final List<Field> fields)
410410
{
411411
int blockLength = 0;
412412

413-
for (final Field field : fieldList)
413+
for (final Field field : fields)
414414
{
415415
if (field.groupFields() != null)
416416
{

0 commit comments

Comments
 (0)