Our company uses checkstyle to ensure the java source code having no nested if..else. i am trying to get used to it. but i have this doubt, is this a efficient way to improve code quality?
we have many rules,
- no nested if else
- Method should be no longer than 50 lines.
- anonymous inner class no longer than 15 lines.
- there must be a white space before {, which means we have to use Ctrl+Shift+F to format code.
There are arguments for favoring polymorphism over use of switch or if else blocks. Here is a link to a google tech talk discussing the issue