[英]IntelliJ - Unnecessary 'null' check before equals
All of a sudden 突然间
intellij-idea is giving me warning / hints on code like this:
intellij-idea在这样的代码上给我警告/提示:
if (header != null && header.equals(PROXY_REQUEST_VALUE)) {
// ...
}
The hint says: 提示说:
Unnecessary 'null' check before equals()
equals()之前的不必要的“ null”检查
And the little lamp solution changes the code to 小灯解决方案将代码更改为
if (PROXY_REQUEST_VALUE.equals(header) {
// ...
}
I don't like Yoda conditions . 我不喜欢尤达的条件 。 How do I disable the 'feature'?
如何禁用“功能”?
Version is: Ultimate 2017.1.6
版本是:
Ultimate 2017.1.6
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.