代码改变世界

[hyddd的FindBugs分析记录][M D RCN]Repeated conditional tests

2009-02-13 22:57  hyddd  阅读(2574)  评论(0编辑  收藏  举报

[M C RpC] Repeated conditional tests [RpC_REPEATED_CONDITIONAL_TEST]

The code contains a conditional test is performed twice, one right after the other (e.g., x == 0 || x == 0). Perhaps the second occurrence is intended to be something else (e.g., x == 0 || y == 0).

 

这个不解释,一看代码就知道:

    public void test{
    String str = "123";
            
if(str!=null){
                
if(str!=null){  //重复了
                 System.out.println(
"123");
                }
            }
    }