-
Notifications
You must be signed in to change notification settings - Fork 55
Make schema updates work on non-Windows platforms #135
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
Conversation
Rework various constants in EiffelConstants to be java.nio.file.Path objects instead of strings. That makes the intention of the constants clear and we can easily work with Path objects to generate correct paths on any platform.
Previously all versions of the events were returned and they were all converted and written to the same destination file. This happened to work fine when the list of files returned from File.listFiles() was in the correct order so that the latest version was the last file to be processed. If that wasn't the case one or more schema files didn't get the most recent version of the event. We address this by using a version string parser to sort the filenames in version order before picking the greatest version and generating a schema from that file only.
raja-maragani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice code refactor changes.
|
@raja-maragani @SantoshNC68: Should we merge this now or do we have anything outstanding? |
|
We have a small task to change the domain Id part of handling, once that is done we can merge this changes |
How does the domain id code overlap with this patch? |
|
sorry thought this was the paris release, the other PR. my mistake. It is ok to merge this change. |
|
I will merge these changes |
|
Will make a release of this along with the domain Id changes. |
|
Thanks! I'm just about to push the PR for reverting manual changes which would enable merging the Paris update. Including those two PRs in the new release would probably save everyone's time. |
Applicable Issues
Closes #131
Description of the Change
Fixes two fatal problems encountered while trying to update schemas and generate POJOs on Linux:
Alternate Designs
None.
Benefits
Non-Windows users can update the schemas.
Possible Drawbacks
None.
Sign-off
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
Signed-off-by: Magnus Bäck <magnus.back@axis.com>