fixes sonar/jenkis issue about Malicious code vulnerability - May expose internal representation by returning reference to mutable object