首页 > 代码库 > 代码规范性检查

代码规范性检查

  1. [主要] A method/constructor shouldnt explicitly throw java.lang.Exception 方法或构造方法不应该显式的抛Exception
    •   It is unclear which exceptions that can be thrown from the methods. It might be difficult to document and understand the vague interfaces. Use either a class derived from RuntimeException or a checked exception.
  2. [主要] Avoid really long methods. 
    •   Violations of this rule usually indicate that the method is doing too much. Try to reduce the method size by creating helper methods and removing any copy/pasted code.

代码规范性检查