bayard      2003/07/30 16:58:36

  Modified:    lang     DEVELOPERS-GUIDE.html
  Log:
  Added note that IllegalArgumentException should be thrown when a bad argument
  of 'null' is passed in and not NullPointerException.
  
  Also a note that XxxUtils classes should suppress Exceptions when sensible.
  
  Revision  Changes    Path
  1.3       +8 -1      jakarta-commons/lang/DEVELOPERS-GUIDE.html
  
  Index: DEVELOPERS-GUIDE.html
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/DEVELOPERS-GUIDE.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DEVELOPERS-GUIDE.html     30 Jul 2003 23:54:33 -0000      1.2
  +++ DEVELOPERS-GUIDE.html     30 Jul 2003 23:58:36 -0000      1.3
  @@ -59,6 +59,8 @@
   <li>deal with one class or interface and its variations (subclasses)</li>
   <li>provide methods that perform useful utility functions</li>
   <li>the class will not be final</li>
  +<li>methods should generally be 'nice' and 'quiet'.  That is, they should 
  +suppress Exceptions when sensible. </li>
   </ul>
   
   <p>A utility class can act as a factory for specific implementations of a class or 
  @@ -99,6 +101,11 @@
   
   <p>If an example is needed enclose it with &lt;pre&gt;&lt;/pre&gt;.
   It should be supported with an explanation within a normal paragraph.</p>
  +
  +<h4>Exception throwing</h4>
  +<p>When throwing an exception to indicate a bad argument, always throw 
  +IllegalArgumentException, even if the argument was null. Do not throw 
  +NullPointerException. </p>
   
   </body>
   </html>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to