mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-22 22:27:47 -04:00
* Avoid "this-escape" by making classes final The "this-escape" compiler warning is intended to alert developers to potential bugs in object initialization due to subclassing. This class of bugs cannot occur when a class is final. Here, we take cases where a class has no implementations but generates a "this-escape" warning, and we make those classes final rather than suppressing the compiler warning. This makes the remaining suppressions more meaningful, since they now indicate places where we may want to look for initialization bugs. In a few cases, making a class final meant changing some of its protected fields and methods to private or default accessibility. Some classes with no implementations are mocked in testing. Since making those classes final would involve non-trivial rewrites of tests, I've left them alone. * Spotless, remove redundant modifiers, clean up "protected" usage * Revert a few more mocked classes |
||
---|---|---|
.. | ||
src | ||
build.gradle | ||
LICENSE.txt | ||
NOTICES.txt |