```java if (someCondition == true) { // ... } ```
if(singleRequest !=null){
// do my work
}else{
// do my other work
}
PMD建议避免使用`if (x != y) ..; else ..
;
错误的描述如下:
In an "if" expression with an "else" clause, avoid negation in
the test. For example, rephrase:
if (x != y) diff(); else same();
as:
if (x == y) same(); else diff();
Most "if (x != y)" cases without an "else" are often return
但我仍然无法理解对我的代码产生的影响。如果有人能够给我提供一个示例指导,我将不胜感激。