-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore: minor internal refactors #2491
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.
Hi. Thanks for the pull request. JsonSchemaVersion
relocation, while reasonable semantically, will break binary compatibility of items depending on the WireMock Core API. I do not think it worth the effort to migrate, at least until there is a major breaking re-architecture towards WireMock 4
src/main/java/com/github/tomakehurst/wiremock/client/WireMock.java
Outdated
Show resolved
Hide resolved
This reverts commit 2c05908.
@oleg-nenashev Would you mind re-review it? |
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.
Thanks, these refactorings are fine. They do not reduce the code side or remove duplication, but arguably they improve code readability and might be helpful in the future
@oleg-nenashev can you please take a look again? |
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.
Will try to merge it over the weekend
As part of university course assignment, I have to perform refactor where possible.
Here is the list of commits and what kind of refactor was followed.
926936b Extract Variable
extracted non trivial boolean operations in condition block and put it in self explanatory named variable.
c6f0261 Decompose Conditional
moved scenario checking condition in
BasicMappingBuilder.build
. Also usedcheckState
58b6723 Extract Method
moved header injection and verifying response status in its own methods from
HttpAdminClient.safelyExecuteRequest
4. 2c05908 Extract ClassI noticed JsonSchemaVersion should not be in
WireMock
class and saw that this was mentioned in the PR. Feel free to enlighten me about the side-effects this change could result or any other suggestion.References
I haven't created an issue but would be happy to create one as I want to implement some more refactors.
Submitter checklist
#help-contributing
or a project-specific channel like#wiremock-java