views:

97

answers:

2

I have several Java projects checked out into my Eclipse workspace, some of which are being worked on by several distributed teams. Is there a plug-in/setting that will allow me to detect exception blocks that are empty? I am trying to figure out how we can improve code quality across all of our projects and avoid expensive defects down the road.

Thanks!

+3  A: 

Under Java -> Compiler -> Errors/Warnings, I found the more general ability to find empty blocks of all types ("Undocumented empty blocks"). This doesn't prevent someone from commenting an empty block, but then leaving it empty is more of a conscious decision.

Also set the templates so that the default error block is something that would cause an error.

Kathy Van Stone
+3  A: 

Try PMD and FindBugs, both are great tools and have eclipse plugins.

GvS