Cleaning up a large, legacy Java project

Viewed 2355

I've been assigned to do some work on a huge Java project, and the influence of several iterations of developers is obvious. There is no standard coding style, formatting, naming conventions or class structure. It's a good day when I come across a class with Javadoc, and unit testing is a happy daydream.

So far those of us on the project have been "blending in", adapting to the existing convention of whatever class we're working on, but the time is coming to impose some order and consistency.

It's a daunting challenge, and I'm looking for any advice people might have on such a task. Are there any strategies that have been particularly effective, or pitfalls to look out for? Is it even a good idea to try?

Edit to add: I don't want to give the impression that the project is bad - it is in fact solidly designed and largely well-written. It's just feeling its age and the inevitability of maintenance...

9 Answers
Related