Hi, On Thu, Sep 6, 2012 at 2:36 PM, Marcel Reutegger <[email protected]> wrote: > I think we need to throw an exception in this case. IllegalArgumentException?
Agreed in general. I've already encountered a few cases where a test case runs just fine in Eclipse (without assertions enabled) but then fails during the Maven build (which enables assertions). It would be better if such failsafes were executed always unless they're too expensive to compute in normal operation. The precondition feature [1] in Guava is a pretty nice way to implement such checks. [1] http://code.google.com/p/guava-libraries/wiki/PreconditionsExplained BR, Jukka Zitting
