Incorrect lazy initialization of static field

utilizing sonar, or findbug, report above error message for this code.

public static void updateQuotation(String symbol, RawQuotation newValue) {

if (quotations == null) {
quotations = new HashMap();
}

quotations.put(symbol, newValue);
}

quotations is a static variable.

what findbug suggesting is actually about thread safety.

Incorrect lazy initialization and update of static field
This method contains an unsynchronized lazy initialization of a static field. After the field is set, the object stored into that location is further accessed. The setting of the field is visible to other threads as soon as it is set. If the futher accesses in the method that set the field serve to initialize the object, then you have a very serious multithreading bug, unless something else prevents any other thread from accessing the stored object until it is fully initialized.

https://lwpro2.wordpress.com/2010/12/20/incorrect-lazy-initialization-of-static-field/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store