-
Notifications
You must be signed in to change notification settings - Fork 694
GEODE-7167: eliminate NPE when parsing locators property #4018
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
dschneider-pivotal
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.
This looks good. The only suggestion I have is you might want to try to improve the coverage of you unit test. I saw the parse code looking for '@' but I didn't see that covered and some of the other error conditions (like port being 0) didn't look covered. Try running your new unit test in your IDE with coverage and see how well the new code is covered. To get some of it covered you might need to use a spy and extract some of the code (like new InetSocketAddress) into a method that you can then mock to return a mocked InetSocketAddress that will say it is not loopback (so that you can generate the error about attempting to join...). It looks to me like you have already improved the unit test coverage of this code.
Did one of your new tests fail with an NPE before your fixes?
|
Yes @dschneider-pivotal, before the product fix, I did consider adding tests for parsing of the "host" part and opted not too. Your comment has made me reconsider… |
|
This pull request introduces 1 alert when merging 8fed26e into 5f70160 - view on LGTM.com new alerts:
|
4309346 to
78f186d
Compare
|
will this fix GEODE-6153 as well? |
|
Yes @onichols-pivotal. Those are dupe tickets. |
|
@Bill Should I merge this? |
78f186d to
4b69379
Compare
GEODE-7167
Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
Has your PR been rebased against the latest commit within the target branch (typically
develop)?Is your initial contribution a single, squashed commit?
Does
gradlew buildrun cleanly?Have you written or updated unit tests to verify your changes?
If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
Note:
Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.