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
JS-41: make API objects immutable #60
Conversation
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.
I only skimmed the PR so far, but I'd like to know your thoughts on switching to builder pattern to achieve immutability instead of using the with
factory methods. Will review further once we resolve that decision.
FYI, the force-pushes were just some other cleanup I ran into while testing, but the other new commits are relevant to your feedback, @mattixtech |
Co-Authored-By: Matthew Brooks <Matt@mattbrooks.ca>
Co-Authored-By: Matthew Brooks <Matt@mattbrooks.ca>
I thiiiink this takes care of all your feedback, @mattixtech. Lemme know how it looks. |
This PR updates a number of the API objects to be immutable, and reworks the API for interacting with the client and HTTP options and such a little bit as a result.
It also includes a refactor of the mock HTTP implementation(s) as they had kind of become a mess and I wanted to tweak them as I was testing DAO changes.
Pull Request Check Sheet
If so, you should:
${JIRA-ISSUE-NUMBER}: subject of pull request
Pull Request Process
One or more reviewers should be assigned to each PR.
If you know that a particular person is subject matter expert in the area your PR affects, feel free to assign one or more reviewers when you create this PR, otherwise reviewers will be assigned for you.
Once the reviewer(s) accept the PR and the branch passes continuous integration in Bamboo, the PR is eligible for merge.
At that time, if you have commit access (are an OpenNMS Group employee or a member of the Order of the Green Polo) you are welcome to merge the PR.
Otherwise, a reviewer can merge it for you.
Thanks for taking time to contribute!
External References