Skip to content

修复空指针问题#270

Merged
hcsp-bot merged 1 commit intomasterfrom
yangbi
Aug 4, 2021
Merged

修复空指针问题#270
hcsp-bot merged 1 commit intomasterfrom
yangbi

Conversation

@yangbisheng
Copy link
Copy Markdown
Contributor

  • 这个PR解答了当前仓库中的题目(机器人会自动判题并合并当前PR)
  • 这个PR修复了当前仓库中的一些代码缺陷(机器人不会判题,而是由管理员来处理当前PR)

@hcsp-bot
Copy link
Copy Markdown
Contributor

hcsp-bot commented Aug 4, 2021

🎉 感谢提交Pull Request!请稍等片刻,我们已经将其提交到CI进行检查,一旦有结果会立即通知您!
不过,我们发现你在这个仓库中还打开了其他的Pull Request:

#269

我们不鼓励同时打开多个Pull Request,请集中精力于现在的这个Pull Request,谢谢!:pray:

// 当灯亮时返回true,灭和未知状态返回false
public boolean isOn() {
return on;
if (on == null || on == false) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

不必要的条件逻辑。
表达式可被简化。

return on;
if (on == null || on == false) {
return false;
}else{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

'}' 后应有空格。
'else' 后应有空格。
'else' 前应有空格。
'{' 前应有空格。

@hcsp-bot
Copy link
Copy Markdown
Contributor

hcsp-bot commented Aug 4, 2021

恭喜你,你的提交 0d484f7 已经通过我们的CI检查:Your tests passed on CircleCI!

👍 它会被自动merge后revert。请不要骄傲,继续挑战!

点击这里查看模范代码

@hcsp-bot hcsp-bot merged commit 1500020 into master Aug 4, 2021
hcsp-bot added a commit that referenced this pull request Aug 4, 2021
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.

2 participants