directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <>
Subject Re: Should we use assert ?
Date Fri, 04 Jun 2010 12:10:05 GMT
Emmanuel Lecharny wrote:
> Hi guys,
> currently (and probably because nobody uses them, due to some Java 1.3
> habits we have), we don't use asserts to do simple things like checking
> methods parameters (pre-conditions).
> Should we start using them ?

I never used them before.

For me assert is a bit magic because they are disabled at runtime and
the assert statement isn't evaluated unless they are enabled. I prever
to throw a IllegalArgumentException instead.

My 2 cents,

View raw message