Automatic merge from submit-queue (batch tested with PRs 47993, 47892, 47591, 47469, 47845) Only do string trim when it's necessary This will enhance performance a little bit. **Release note**: ``` NONE ```