Hi I'm trying to get rid of this code smell but it appears this sonar rule believes the replace method is not mutable  