Clean up and gently refactor metrics codebases
This week seems like a good time to finally clean up and gently refactor the metrics codebases. There are currently no large, unmerged branches open, and we did not schedule any releases for this week.
I started making changes to all five codebases. Most of the changes are based on warnings produced by IntelliJ's Code Analysis tool. None of the changes are meant to change behavior.
Reviews will be a challenge, which is why I'm trying to do only one type of change per commit. Also, I'm pushing commits as early as I can while continuing to make more changes. I'd appreciate a 2-step review process where the first step is to very quickly decide whether a commit is useful or maybe even harmful and the second step is to review in detail whether changes in a commit are correct.
I'll post 5 branches as soon as I have a ticket number. I'll also comment whenever I post new commits to any of these branches.
Setting priority to high, because we should finish this work before resuming any other tasks.