Description
methods should be synchronized.
Background information:
In a multi-threaded situation, un-synchronized lazy initialization of non-volatile fields could mean that a second thread has access to a half-initizliaed object while the first thread is still creating it. Allowing such access could cause serious bugs. Instead. the initizliation block should be synchronized or the variable made volatile. Similarly, updates of such fields should also be synchronized.
You will need to test by running an OpenMRS instance with these changes to see if it still runs to completion without freezing. That is to the point where you can log in.