报告在循环开始或结束处的条件中断,并建议使用循环条件来缩短代码。

示例:


  while (true) {
    if (i  == 23) break;
    i++;
  }

在应用快速修复后:


  while (i != 23) {
    i++;
  }