I'm observing this issue in the codebase for quickfixj-1.3.2.

If you invoke one of the constructors

  public SessionSettings(String filename) throws ConfigError;
  public SessionSettings(InputStream stream) throws ConfigError;

the method SessionSettings.load() is called.  So far, so good.

The problem is that in load(), when the "[SESSION]" token is hit, the
code
populates the currentSection properties map with the default
properties:

  currentSection = new Properties(getSessionProperties
(DEFAULT_SESSION_ID));

But at this point in the code, the default properties are empty!

To resolve this problem, there should be an alternative constructor
(to the ones above)
that takes a default properties map, in case the API user wants load()
to pre-load
the right default properties.  Eg:

  public SessionSettings(InputStream stream, Properties defaultProps)
throws ConfigError
  {
    getOrCreateSessionProperties(DEFAULT_SESSION_ID).putAll
(defaultProps);
    load(stream);
  }

I've seen various hacks posted on the net because of this shortfall in
the API.
But I think the most sensible resolution is to improve the API with a
constructor
similar to the above.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Financial Information eXchange" group.
To post to this group, send email to fix-proto...@googlegroups.com.
To unsubscribe from this group, send email to 
fix-protocol+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fix-protocol?hl=en.

Reply via email to