You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "zzzzzzzs (via GitHub)" <gi...@apache.org> on 2023/04/16 13:15:37 UTC
[GitHub] [doris] zzzzzzzs opened a new pull request, #18712: TOperationStatus determines that a null pointer is redundant.
zzzzzzzs opened a new pull request, #18712:
URL: https://github.com/apache/doris/pull/18712
# Proposed changes
TOperationStatus determines that a null pointer is redundant. If tOperationStatus is a null pointer, then tOperationStatus.getMessage() will have a null pointer exception.
## Problem summary
change BrokerUtil.java and BrokerReader.java
## Checklist(Required)
* [ ] Does it affect the original behavior
* [ ] Has unit tests been added
* [ ] Has document been added or modified
* [ ] Does it need to update dependencies
* [ ] Is this PR support rollback (If NO, please explain WHY)
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zzzzzzzs commented on pull request #18712: [improvement] TOperationStatus determines that a null pointer is redundant.
Posted by "zzzzzzzs (via GitHub)" <gi...@apache.org>.
zzzzzzzs commented on PR #18712:
URL: https://github.com/apache/doris/pull/18712#issuecomment-1519293729
> > >
> >
> >
> > > > > NullPointerException is not a good exception, better to avoid it.
> > > >
> > > >
> > > > If tOperationStatus is null, it will enter the conditional branch. If it enters the conditional branch, the subsequent tOperationStatus.getMessage() method will throw a NullPointerException.
> > >
> > >
> > > What I mean is, after your modification, if `tOperationStatus` is null, it may throw NPE. But it is not a good idea to throw NPE.
> >
> >
> > I think we should separately check if `tOperationStatus` is null. What do you think?
>
> looks good to me
PTAL
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morningman merged pull request #18712: [improvement] TOperationStatus determines that a null pointer is redundant.
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman merged PR #18712:
URL: https://github.com/apache/doris/pull/18712
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morningman commented on pull request #18712: [improvement] TOperationStatus determines that a null pointer is redundant.
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #18712:
URL: https://github.com/apache/doris/pull/18712#issuecomment-1529866960
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morningman commented on pull request #18712: [improvement] TOperationStatus determines that a null pointer is redundant.
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #18712:
URL: https://github.com/apache/doris/pull/18712#issuecomment-1519226862
> >
>
> > > > NullPointerException is not a good exception, better to avoid it.
> > >
> > >
> > > If tOperationStatus is null, it will enter the conditional branch. If it enters the conditional branch, the subsequent tOperationStatus.getMessage() method will throw a NullPointerException.
> >
> >
> > What I mean is, after your modification, if `tOperationStatus` is null, it may throw NPE. But it is not a good idea to throw NPE.
>
> I think we should separately check if `tOperationStatus` is null. What do you think?
looks good to me
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #18712: [improvement] TOperationStatus determines that a null pointer is redundant.
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18712:
URL: https://github.com/apache/doris/pull/18712#issuecomment-1529868218
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zzzzzzzs commented on pull request #18712: TOperationStatus determines that a null pointer is redundant.
Posted by "zzzzzzzs (via GitHub)" <gi...@apache.org>.
zzzzzzzs commented on PR #18712:
URL: https://github.com/apache/doris/pull/18712#issuecomment-1510406654
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morningman commented on pull request #18712: [improvement] TOperationStatus determines that a null pointer is redundant.
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #18712:
URL: https://github.com/apache/doris/pull/18712#issuecomment-1518668759
> > NullPointerException is not a good exception, better to avoid it.
>
> If tOperationStatus is null, it will enter the conditional branch. If it enters the conditional branch, the subsequent tOperationStatus.getMessage() method will throw a NullPointerException.
What I mean is, after your modification, if `tOperationStatus` is null, it may throw NPE. But it is not a good idea to throw NPE.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morningman commented on pull request #18712: [improvement] TOperationStatus determines that a null pointer is redundant.
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #18712:
URL: https://github.com/apache/doris/pull/18712#issuecomment-1517338799
NullPointerException is not a good exception, better to avoid it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zzzzzzzs commented on pull request #18712: [improvement] TOperationStatus determines that a null pointer is redundant.
Posted by "zzzzzzzs (via GitHub)" <gi...@apache.org>.
zzzzzzzs commented on PR #18712:
URL: https://github.com/apache/doris/pull/18712#issuecomment-1517463290
> NullPointerException is not a good exception, better to avoid it.
If tOperationStatus is null, it will enter the conditional branch. If it enters the conditional branch, the subsequent tOperationStatus.getMessage() method will throw a NullPointerException.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zzzzzzzs commented on pull request #18712: [improvement] TOperationStatus determines that a null pointer is redundant.
Posted by "zzzzzzzs (via GitHub)" <gi...@apache.org>.
zzzzzzzs commented on PR #18712:
URL: https://github.com/apache/doris/pull/18712#issuecomment-1518677105
>
> > > NullPointerException is not a good exception, better to avoid it.
> >
> >
> > If tOperationStatus is null, it will enter the conditional branch. If it enters the conditional branch, the subsequent tOperationStatus.getMessage() method will throw a NullPointerException.
>
> What I mean is, after your modification, if `tOperationStatus` is null, it may throw NPE. But it is not a good idea to throw NPE.
I think we should separately check if tOperationStatus is null. What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #18712: [improvement] TOperationStatus determines that a null pointer is redundant.
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18712:
URL: https://github.com/apache/doris/pull/18712#issuecomment-1529868106
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org