Because you get ReplicatedRecordStore without creating, there is a race condition for NPE

below code throws NPE for example:

        final HazelcastInstance instance1 = Hazelcast.newHazelcastInstance();
        final HazelcastInstance instance2 = Hazelcast.newHazelcastInstance();
        final HazelcastInstance instance3 = Hazelcast.newHazelcastInstance();
        final HazelcastInstance instance4 = Hazelcast.newHazelcastInstance();


        final HazelcastInstance client = HazelcastClient.newHazelcastClient();

        client.getReplicatedMap("rep").get("key");