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, Stefan