Software Archeology
The difficulty of testing the error path of splitDateTime() and the fact that I could not figure out where the exception supposedly came from bothered me. It was time for an archeological expedition into the project’s history.
Searching back, I discovered that the error handling was added two years prior as part of a different function [4496926]. I also noticed that the body of the try block called a collaborator that was no longer involved in the present day code. About a year ago, it was refactored into its current function [e7c7d40], but the try block still called the collaborator. Finally, I found the code from ten months ago that replaced the original implementation with the current one [b838a21]. The current code could ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access