Asset Client and BAM event publisher re fractor

You need to write above either as 
if(instance != null) {
	return instance;
}
synchronized(EventPublisher.class) {
	if(instance != null) {
		return instance;
	}
	instance = new EventPublisher();
	return instance;
}

or 

if(instance == null) {
	synchronized(EventPublisher.class) {
		if(instance == null) {
			instance = new EventPublisher();
		}
	}
}
return instance;

Otherwise, even when the instance has been already initialised, getInstance() would be always synchronous which is not needed.