- assertions in private methods, indicate programming errors
- checks in public methods using if->throw new Exceptions, indicate wrong use of public API (IllegalArgumentException might be a good one)
- Contracts (just had a look at Contracts for Java) - use annotations to put down pre- and post conditions.
No comments:
Post a Comment