In java.lang.ClassLoader defaultDomain is an instance field
yet in the method getDefaultDomain() synchronizes on ClassLoader.class.
Also The "double-check" idiom used on defaultDomain in this method violates correct synchronization semantics, and can fail on multiprocessor JVMs.
yet in the method getDefaultDomain() synchronizes on ClassLoader.class.
Also The "double-check" idiom used on defaultDomain in this method violates correct synchronization semantics, and can fail on multiprocessor JVMs.