philadelphia-core: Extract 'FIXMessage' exceptions
Move the logic to construct and throw an exception off the fast path.
@@ -168,7 +168,7 @@ public class FIXMessage {
while (buffer.hasRemaining()) {
if (count == tags.length)
- throw new FIXMessageOverflowException("Too many fields");
+ tooManyFields();
int tag = FIXTags.get(buffer);
if (tag == 0)
@@ -262,4 +262,8 @@ public class FIXMessage {
}
}
+ private static void tooManyFields() throws FIXMessageOverflowException {
+ throw new FIXMessageOverflowException("Too many fields");
+ }
+
}
