首页 > 其他 > 详细

代码规范性检查

时间:2016-10-25 13:39:59      阅读:501      评论:0      收藏:0      [点我收藏+]
  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.

代码规范性检查

原文:http://www.cnblogs.com/lingear/p/5996046.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!