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

Fix NullPointerException in getStore #359

Merged
merged 2 commits into from
Dec 6, 2021

Conversation

birdstorm
Copy link
Collaborator

If callWIthRetry returns a null response, getStore will throw NullPointerException.

Signed-off-by: birdstorm <samuelwyf@hotmail.com>
if (resp != null) {
return resp.getStore();
}
return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add some comments about:

  1. the possible scenarios where get store fails with a null response
  2. why not throw an exception in those scenarios

Copy link
Contributor

@Little-Wallace Little-Wallace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@marsishandsome marsishandsome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason
Copy link
Member

zz-jason commented Dec 5, 2021

/merge

@ti-srebot
Copy link
Collaborator

/run-all-tests

@ti-srebot
Copy link
Collaborator

@birdstorm merge failed.

@zz-jason zz-jason merged commit bb3ace7 into tikv:master Dec 6, 2021
ti-srebot pushed a commit to ti-srebot/client-java that referenced this pull request Dec 6, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Collaborator

cherry pick to release-3.1 in PR #364

@birdstorm birdstorm deleted the fix-null-pointer-in-get-store branch December 9, 2021 12:07
ankita25 pushed a commit to ankita25/client-java that referenced this pull request Dec 14, 2021
Signed-off-by: Ankita Wagh <awagh@pinterest.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants