Fixed sonar issues by using java collectin interfaces