Details
Description
The following context diff shows a patch which cleans up the issue by reducing the possibility of a null pointer.
-
-
- quickfixj/core/src/main/java/quickfix/MessageUtils.java Thu Jan 15 11:47:03 2009
- quickfixj-svn/core/src/main/java/quickfix/MessageUtils.java Tue Jan 20 15:49:54 2009
***************
- 104,107 ****
- 104,116 ----
String customApplVerID = null;
-
+ MessageFactory messageFactory = session.getMessageFactory();
+ DataDictionaryProvider ddProvider = session.getDataDictionaryProvider();
+ DataDictionary sessionDataDictionary = ddProvider.getSessionDataDictionary(beginString);
+ DataDictionary payloadDataDictionary = null;
+
+ // We check and if it's a Admin message we don't need anything more
+ if (MessageUtils.isAdminMessage(msgType))
else {
if (FixVersions.BEGINSTRING_FIXT11.equals(beginString))
! MessageFactory messageFactory = session.getMessageFactory();
!
! DataDictionaryProvider ddProvider = session.getDataDictionaryProvider();
! DataDictionary sessionDataDictionary = ddProvider.getSessionDataDictionary(beginString);
! DataDictionary applicationDataDictionary = ddProvider.getApplicationDataDictionary(
! applVerID, customApplVerID);
quickfix.Message message = messageFactory.create(beginString, msgType);
! DataDictionary payloadDictionary = MessageUtils.isAdminMessage(msgType)
! ? sessionDataDictionary
! : applicationDataDictionary;
!
! message.parse(messageString, sessionDataDictionary, payloadDictionary,
! payloadDictionary != null);
return message;
— 120,130 ----
}
! payloadDataDictionary = ddProvider.getApplicationDataDictionary(applVerID,
! customApplVerID);
! }
quickfix.Message message = messageFactory.create(beginString, msgType);
! message.parse(messageString, sessionDataDictionary, payloadDataDictionary,
! payloadDataDictionary != null);
return message;