DM Smith wrote on 31/05/2007 15:59:05: > I think that having assertions is of no value if they are never > turned on :) > > I suggest going carefully in adding assertions. There are a lot of > places where assertions are inappropriate (e.g. checking parameters > on a public method). > > I think Sun's document gives good guidelines: > > http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html
Perhaps the most important guideline regarding assertions is that they should *never* have side effects, otherwise correctness is broken when assertions are disabled. Doron --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
