CS.EMPTY.CATCH

捕获模块中未写入任何内容。如果捕获到异常,建议对其进行处理而不是忽略它。

示例 1

复制
  class FileHandler {
      public void Open(String name) {
          try {
              // opening file ...
          } catch (FileNotFoundException e) {   // defect - no statements in the 'catch' clause
          }
      }
  }

安全培训

应用程序安全培训材料由 Secure Code Warrior 提供。