最容易被违背的规则

CERT为各种 Java的软件系统对《The CERT Oracle Secure Coding Standard for Java》的遵守情况做了一些分析,在我们的记录中,最容易被违背的规则有这几条:

A. EXP01-J. Never dereference null pointers(永远不要间接引用空指针)

B. ERR01-J. Do not allow exceptions to expose sensitive information (不要让异常暴露敏感信息)

C. ERR07-J. Do not throw RuntimeException, Exception, or Throwable(不要抛出RuntimeException、 Exception、或Throwable类型的异常)

D. ERR08-J. Do not catch NullPointerException or any of its ancestors(不要捕获NullPointerException异常或它的任何父类)

E. FIO04-J. Release resources when they are no longer needed(当不再需要某个资源的时候立即释放它)

F. ERR00-J. Do not suppress or ignore checked exceptions(不要抑制或忽略查到的异常)


你可能感兴趣的:(最容易被违背的规则)