Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 12 commits into from

Conversation

philipwhiuk
Copy link
Contributor

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

@chrjohn
Copy link
Member

chrjohn commented Nov 26, 2019

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
Copy link
Member

chrjohn commented Nov 29, 2019

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
Contributor Author

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

@chrjohn
Copy link
Member

chrjohn commented Nov 29, 2019 via email

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

chrjohn commented Nov 29, 2019

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
Copy link
Contributor Author

philipwhiuk commented Dec 2, 2019

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
Copy link
Member

chrjohn commented Dec 2, 2019

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
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
Copy link
Member

chrjohn commented Jan 7, 2020

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
Copy link
Member

chrjohn commented Jan 7, 2020

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
Copy link
Contributor Author

philipwhiuk commented Jan 9, 2020

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
Contributor

@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
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
Contributor

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
Copy link
Member

chrjohn commented Jun 25, 2024

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