Added equals method for remove critical issue in sonar