When I can use it, I am a big fan of using Guava's Preconditions
. However, the Guava jar is 2 MB, which can be quite sizeable...
I have a project whose jar weighs 26k, therefore the question is, is there a lightweight library having such a utility class, with no dependencies other than the JDK (6+)? While I could create one, I'd rather not reinvent the wheel!