summaryrefslogtreecommitdiff
path: root/plugins/InspectionGadgets/src/inspectionDescriptions/NonThreadSafeLazyInitialization.html
blob: f203aa949764f8a38bc5641fe2b9898150507ba2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<html>
<body>
Reports static variables being lazily initialized
in an non-thread-safe manner. Lazy initialization of static variables should be done
in an appropriate synchronization construct, to prevent different threads from
performing conflicting initialization.
<p>
If applicable, quick-fix is suggested
which introduces static holder pattern described in
<a href="http://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom">
http://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom
</a>
where the JVM guarantees thread-safety of such initializations.
<!-- tooltip end -->
<p>

</body>
</html>