Fix sonar code bug and smell issue

No match.