Search code examples
javavalidationassertapache-commons

When should I use Apache Commons' Validate.isTrue, and when should I just use the 'assert' keyword?


When should I use Apache Commons' Validate.isTrue, and when should I just use the 'assert' keyword?


Solution

  • Assertions can be turned off (in fact, they normally are), so they are not useful for validating user input, for example.