Streamlining Large-Scale Java Development Using Error Prone
summary
Shows Error Prone as a Java compiler plugin that both flags and auto-fixes issues (example: a created but not thrown exception becomes throw new IllegalArgumentException), describes building a custom BugChecker (empty-method detector compiled into an annotation-processor jar), and explains Refaster templates that rewrite patterns like arg.equals("") to String.isEmpty() and Optional/stream idioms. Picnic runs this across ~200 engineers, migrated to Java 17 within months, and enforces rewrites in CI using Error Prone’s patching mode so PRs must apply fixes.
AI-written summary · about
chapters (22)
- 0:00Intro
- 1:22Refactoring at scale using Error Prone
- 2:20The online groceries challenge
- 2:58Picnic's numbers
- 3:39SonarQube
- 4:27The need for automated sanity
- 5:28Error Prone
- 7:11Demo
- 10:53Error Prone (continued)
- 16:00Error Prone BugChecker
- 17:54Demo
- 22:44Custom BugChecks at Picnic
- 25:58What's not to like?
- 26:49What if we could write rules by example?
- 27:29Error Prone with Refaster
- 28:50Demo
- 32:27Refaster at Picnic: JDK 11 migration
- 34:53Refaster at Picnic: Reactor anti-patterns
- 35:29When to use Refaster?
- 36:12Refaster vs BugChecks
- 36:59Integrating Error Prone with CI
- 39:26Outro
related talks
45mAutomating away bugs with Error Prone in practice
31mError Prone: Google's Secret Weapon for Bug-Free Lines of Code
40mAssuring top-notch code quality in the Java Universe
40mCatching More Bugs with Fewer False Alarms
15mTest && commit || revert
44mThe long good-bye to NPE
58mPractical Java Problem Solving: A Hands-On Guide to Debugging
43mError Handling Strategies for Kotlin Programs
