This post originated from an RSS feed registered with Java Buzz
by Dave Booth.
Original Post: Avoiding assert statements with constant conditions
Feed Title: IntelliJ IDEA Blog
Feed URL: http://blogs.jetbrains.com/idea/feed/
Feed Description: All the most recent updates, views, and information on IntelliJ IDEA... straight from the source.
Assert statements can be very useful to check runtime assumptions. Checking conditions which are constant, and thus never change at runtime, is not so useful. Particularly unnecessary are assert conditions which always evaluate to true, because they will never throw an error and only serve to use up cpu resources.
Here is an example found in [...]