Skip to content

QFJ-981 / QFJ-982 Remove settings from DataDictionary class - #245

Closed
philipwhiuk wants to merge 12 commits into
quickfix-j:masterfrom
philipwhiuk:github-dds
Closed

philipwhiuk wants to merge 12 commits into
quickfix-j:masterfrom
philipwhiuk:github-dds

Conversation

@philipwhiuk

Copy link
Copy Markdown
Contributor

Not much testing on this but here's where we're/I'm thinking of going with it.

@chrjohn

chrjohn commented Nov 26, 2019

Copy link
Copy Markdown
Member

Did not follow this up through the changed code yet but there are NullPointerExceptions at

at quickfix.DataDictionary.checkHasValue(DataDictionary.java:683)
at quickfix.DataDictionary.iterate(DataDictionary.java:555)
at quickfix.DataDictionary.validate(DataDictionary.java:538)
at quickfix.Session.next(Session.java:998)

Probably forgotten to pass the default validation settings?!

Thanks for the PR!

@chrjohn

chrjohn commented Nov 29, 2019

Copy link
Copy Markdown
Member

Hi @philipwhiuk , I wanted to add a test for QFJ-981 which is related to this issue. However, I do not seem to be able to push changes to this branch. Have you enabled push access for maintainers on this PR?
Thanks,
Chris.

@philipwhiuk

Copy link
Copy Markdown
Contributor Author

Yep I allowed edits from maintainers... Not sure why it won't let you push..

@chrjohn

chrjohn commented Nov 29, 2019 via email •

Copy link
Copy Markdown
Member

Test that validation settings are applied when no explicit AppDataDictionary is defined.
@chrjohn

chrjohn commented Nov 29, 2019

Copy link
Copy Markdown
Member

Nevermind, turned out I was using the wrong branch

@chrjohn chrjohn changed the title QFJ-982 Remove settings from DataDictionary class QFJ-981 / QFJ-982 Remove settings from DataDictionary class Nov 29, 2019
@chrjohn chrjohn added this to the QFJ 2.2.0 milestone Nov 29, 2019
@philipwhiuk

philipwhiuk commented Dec 2, 2019 •

Copy link
Copy Markdown
Contributor Author

I'm wondering whether it's better to rename the new struct to ValidationSettings. It's kind of a half way between SessionSettings and DataDictionarySettings.

@chrjohn

chrjohn commented Dec 2, 2019

Copy link
Copy Markdown
Member

I'm wondering whether it's better to rename the new struct to ValidationSettings. It's kind of a half way between SessionSettings and DataDictionarySettings.

Sounds sensible. ValidationSettings is more descriptive.

@philipwhiuk

Copy link
Copy Markdown
Contributor Author

While trying to test this, I tried to design scenario that was easy to QA. I ran into #247 which I didn't expect.

I'm trying to decide whether my calling code should call DataDictionary.validate after constructing a message or whether #247 is valid.

@chrjohn

chrjohn commented Jan 7, 2020

Copy link
Copy Markdown
Member

Hi @philipwhiuk , I was thinking about into which version this fix needs to go. When using semantic versioning (which I'm roughly trying to follow) this needs to go into 3.0 due to public interface changes, right?

@chrjohn

chrjohn commented Jan 7, 2020

Copy link
Copy Markdown
Member

I think I failed at trying to resolve the merge conflict. Will check.

updated DataDictionaryTest.testCopy()
 * removed no longer needed checks since validation settings are set via ValidationSettings
corrected imports and usage of MessageUtils.parse()
@philipwhiuk

philipwhiuk commented Jan 9, 2020 •

Copy link
Copy Markdown
Contributor Author

Hi @philipwhiuk , I was thinking about into which version this fix needs to go. When using semantic versioning (which I'm roughly trying to follow) this needs to go into 3.0 due to public interface changes, right?

Yes, it's probably 3.0. We're testing this change internally at current. No issues so far :)

@chrjohn chrjohn modified the milestones: QFJ 2.2.0, QFJ 3.0.0 Jan 9, 2020
@the-thing

Copy link
Copy Markdown
Collaborator

@chrjohn

QFJ-981/QFJ-982 are actually a duplicate of 2016 issue QFJ-877, but there was no investigation so it can be closed once this is merged.

@philipwhiuk

You probably need to add null checks against quickfix.ValidationSettings inside quickfix.Message class (possibly in quickfix.DataDictionary as well). The code assumes that data dictionary and validation settings are either both null or or none. However, these are public methods and they can be called with any arguments.

  • quickfix.DataDictionary#validate(quickfix.Message, quickfix.ValidationSettings)
  • quickfix.Message#fromString(java.lang.String, quickfix.DataDictionary, quickfix.DataDictionary, quickfix.ValidationSettings, boolean, boolean)

Additionally, these methods were not overloaded. This is a breaking change as I have seen these methods being used in test and FIX simulator code while working for at least two clients. This one might not be a big deal and probably does not need to be fixed, but it will add some work for developers integrating with the newest version.

@philipwhiuk

Copy link
Copy Markdown
Contributor Author

Yeah it's a breaking change. I think the plan is to release this as 3.0.0

I'm happy to review PRs to add null checks.

We're using this internally and it works fine.

@the-thing

Copy link
Copy Markdown
Collaborator

Null checks would be good to have, but your choice. I would not worry to much about it.

@chrjohn chrjohn changed the title QFJ-981 / QFJ-982 Remove settings from DataDictionary class QFJ-981 / QFJ-982 Remove settings from DataDictionary class May 4, 2021
@chrjohn chrjohn self-assigned this Feb 14, 2024
@chrjohn

chrjohn commented Jun 25, 2024

Copy link
Copy Markdown
Member

Hi @philipwhiuk , I have now worked on this to get the changes into master after five years. ;) I hope it is OK that I opened a separate PR for this (somehow got tangled up in the changes of the last, but your commits will of course be included there: #831

Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants