lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
Subject Re: enabling java assertions in the tests
Date Fri, 01 Jun 2007 00:08:39 GMT
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message