@@ -596,6 +596,7 @@ private static <V> void copyCollection(Collection<V> lhs, Collection<V> rhs) {
596596 * Validate a message, including the header and trailer fields.
597597 *
598598 * @param message the message
599+ * @param settings
599600 * @throws IncorrectTagValue if a field value is not valid
600601 * @throws FieldNotFound if a field cannot be found
601602 * @throws IncorrectDataFormat if a field value has a wrong data type
@@ -610,6 +611,7 @@ public void validate(Message message, ValidationSettings settings) throws Incorr
610611 *
611612 * @param message the message
612613 * @param bodyOnly whether to validate just the message body, or to validate the header and trailer sections as well.
614+ * @param settings
613615 * @throws IncorrectTagValue if a field value is not valid
614616 * @throws FieldNotFound if a field cannot be found
615617 * @throws IncorrectDataFormat if a field value has a wrong data type
@@ -623,7 +625,10 @@ static void validate(Message message, DataDictionary sessionDataDictionary,
623625 DataDictionary applicationDataDictionary , ValidationSettings settings ) throws IncorrectTagValue , FieldNotFound ,
624626 IncorrectDataFormat {
625627 final boolean bodyOnly = sessionDataDictionary == null ;
626-
628+ if (settings == null ) {
629+ settings = new ValidationSettings ();
630+ }
631+
627632 if (isVersionSpecified (sessionDataDictionary )
628633 && !sessionDataDictionary .getVersion ().equals (
629634 message .getHeader ().getString (BeginString .FIELD ))
0 commit comments