Sonar Violations and Formatting

should be
return string.equals(that.string)