appendix B Extending static analysis tools

As we have seen throughout this book, many bugs in our programs can be detected by static analyzers. However, even the best static analyzer cannot find all the problems in your code that could be potentially found statically. That’s because your project likely uses your own APIs and has your own patterns and antipatterns. In many projects and libraries, there are methods that should not be called with specific arguments in a specific sequence or under specific conditions. Surely, it’s possible to describe all the caveats in the API documentation, but it would be naïve to expect every developer to read the documentation and remember it when using the API.

In appendix A, we discussed how annotation ...

Get 100 Java Mistakes and How to Avoid Them now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.