From the release notes, checkstyle removed the Double-Checked locking check.
I'm having a hard time understanding why. They replied this not only in the release notes but also in the issue tracker:
Removed the DoubleCheckedLocking check, as in Java 5 (and beyond), using the volatile keyword addresses the issue.
I'm assuming that, if checkstyle is removing this warning, it's because it is no longer helpful. That is, either the error won't happen anymore or another warning does the job. But
I can't see why such error won't happen anymore in Java 5, or how it is complemented by another warning. Could someone care to explain?
EDIT: I understand how adding the volatile keyword solves the issue. My concern is: isn't this warning still worth it somehow? I'm thinking on the case when the programmer uses the aforementioned locking pattern, but forgets to declare the variable volatile. Shouldn't checkstyle still warn about it?