Conversation
Contributor
|
🎉 感谢提交Pull Request!请稍等片刻,我们已经将其提交到CI进行检查,一旦有结果会立即通知您! 我们不鼓励同时打开多个Pull Request,请集中精力于现在的这个Pull Request,谢谢!:pray: |
Contributor
|
恭喜你,你的提交 148ab16 已经通过我们的CI检查:Your tests passed on CircleCI! 👍 它会被自动merge后revert。请不要骄傲,继续挑战! |
blindpirate
reviewed
Jun 17, 2019
| if(on==null||on==false){ | ||
| return false; | ||
| } | ||
| else return on; |
Contributor
Contributor
Author
|
收到
…------------------ 原始邮件 ------------------
发件人: "Bo Zhang"<notifications@github.com>;
发送时间: 2019年6月17日(星期一) 晚上10:26
收件人: "hcsp/fix-boolean-return-value-npe"<fix-boolean-return-value-npe@noreply.github.com>;
抄送: "MR.mister"<845058547@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [hcsp/fix-boolean-return-value-npe] 对on为null的情况加以判定。 (#17)
@blindpirate commented on this pull request.
In src/main/java/com/github/hcsp/datatype/Light.java:
@@ -13,6 +13,9 @@ public Light(Boolean on) { // 当灯亮时返回true,灭和未知状态返回false public boolean isOn() { - return on; + if(on==null||on==false){ + return false; + } + else return on;
你的这个代码有好多警告。
警告1:
警告2:
想一想这是为什么,如果想不清楚再问我。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


修复了一个空指针异常