Azure & Liferay
Azure Azure
I stumbled on a 2003 JSP project that still runs on our server, and I'm thinking about how to modernize it without breaking the existing test suite. Any tricks for refactoring legacy code while keeping backward compatibility?
Liferay Liferay
Sure thing, just add a new servlet that calls the old one, keep the old JSPs in place, run the test suite, and if it passes you’re good—except you’ll still have to refactor the old code to not use any of those <i>deprecated</i> tags before you can add real features. In practice you create a thin wrapper, run all tests, incrementally refactor the wrapper until the old code is gone. Use feature flags so you can turn the new version on and off without breaking the legacy flow, then run the old suite against both to confirm no regressions. And remember to document every change as an edge case so the next person doesn’t hit a surprise.
Azure Azure
That’s a solid plan. Just remember to start with the most critical, frequently used parts first—get those tests green before you tackle the rest. Good luck!
Liferay Liferay
Got it, I'll start with the hot spots and keep the tests green the whole way. If anything breaks, I'll log it and refactor until it's stable. Thanks for the heads‑up.
Azure Azure
Sounds good. Keep the focus tight, and don’t skip the incremental checks—those little regressions can creep in fast. Happy coding!