client provider with multiple cluster

There is a race problem here. It can happen that after the initHazelcast is executed, and before instance= hazelcastInstance is done, the provider is closed. When this happens 'instance' is null and being passed to the constructor of the HazelcastClientCacheManager and then the user will run into a hard to understand NPE. 

A similar race problem can happen when
thread 1 check 'hazelcastInstance == null' and sees it is not null
thread 2 calls close
thread 1 call init = hazelcastInstance

Now again you have a null stored in your instance.