[QFJ-56] Support null LogFactories. Created: 24/Aug/06  Updated: 24/Jan/07  Resolved: 02/Sep/06

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.0.0 Final, 1.0.1, 1.0.2
Fix Version/s: 1.0.3

Type: Bug Priority: Default
Reporter: Toli Kuznets Assignee: Steve Bate
Resolution: Fixed Votes: 0
Labels: None


 Description   

I may be wrong, but it seems that in the constructor for Session there's code that both accesses the incoming logFactory and also checks it for null, but not in the right order:

constructor {
Log log = logFactory.create(sessionID);

try {
<snip>
if (logFactory != null)

{ state.setLog(log); }

log.onEvent("Session " + this.sessionID + " schedule is " + sessionSchedule);
}

seems like if it's possible for the logFactory to be null, that assumption should be tested on the earlier line as wel.



 Comments   
Comment by Toli Kuznets [ 24/Aug/06 ]

oh, i should do a better job of checking HEAD before posting a bug. apparently this has already been addressed in the last checkin.
great job steve!
http://svn.sourceforge.net/viewvc/quickfixj/trunk/core/src/main/java/quickfix/Session.java?r1=474&r2=483

all right, you can close this. thanks!

Comment by Steve Bate [ 26/Aug/06 ]

Already fixed. Thanks for the report.

Comment by Steve Bate [ 26/Aug/06 ]

I'll reopen this for editing this since I didn't create a Jira issue for the original fix. It's more convenient to have an issue for change log and release note purposes.

Generated at Sat Nov 23 10:41:21 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.