Wednesday, October 28, 2026 Today’s Paper
Log in Join free
Vol. I · No. 29 Texas Edition
Wednesday, Oct 28
Texas first. Then the world.
Always free Updated 4 minutes ago
Read. React. Discuss.
Tech

Introduction to Error Prone: How to Catch Bugs at Compile Time

By Hüseyin Akdoğan 1 min read 1 views 0 comments
Introduction to Error Prone: How to Catch Bugs at Compile Time
Image: DZone

The Java compiler’s job is to check whether code follows the rules of the language. Trying to remove an element from a collection that can never contain it, or using the wrong letter in a date pattern, does not break those rules, so nothing stops the code from compiling. In short, any code that follows the rules compiles, even when it does not do what its author intended.

What Is Error Prone?

Error Prone is an open-source static analysis tool that Google built to fill this gap. Unlike most static analysis tools, it does not run as a separate step; it plugs into javac as a plugin. Using the information the compiler produces while analyzing the code, it looks for patterns that follow the rules of the language but are most likely wrong, and reports them as compiler warnings or errors.

DZone Original story · dzone.com
Read the full story

Discussion (0)

No comments yet. Start the conversation!