donaldp 01/03/22 15:11:18 Modified: src/xdocs code-standards.xml Log: Suggested documentation changes/fixes Submitted By: Daniel Barclay <[EMAIL PROTECTED]> Revision Changes Path 1.5 +5 -9 jakarta-avalon/src/xdocs/code-standards.xml Index: code-standards.xml =================================================================== RCS file: /home/cvs/jakarta-avalon/src/xdocs/code-standards.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- code-standards.xml 2001/03/13 20:42:18 1.4 +++ code-standards.xml 2001/03/22 23:11:18 1.5 @@ -129,9 +129,7 @@ needed (like assumptions). </li> <li> -Variables are declared in the inner scope regardless of -performances unless the code really needs for performances -(2 thousand loops every 5 seconds for example) like: +Variables are declared in the inner scope. <source> while( myListIterator.hasNext() ) { @@ -171,11 +169,6 @@ final String myString = "test " + "for " + "performances"; </source> </li> -<li> -Indent comments on an 80 column basis and the code on a -100 column using a two more indention when you're constrained -to wrap a line. -</li> <li> Try not to declare a method as 'synchronized'. If a method accesses a shared resource then surround accesses to that resource with @@ -196,7 +189,10 @@ </source> If you are within a static method, then you may have to create a static object whose sole purpose in life is to provide the -lock you need. +lock you need. Alternatively you could use the Class object for +the class you are in. That is, if you're in class MyClass, use +"MyClass.class". That gets the object of type java.lang.Class +that corresponds to your class MyClass. </li> </ol> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]