The fix used in
YARN-3241 uses a the JDK trim() method to remove leading and trailing spaces. The QueueMetrics uses a guava based trim when it splits the queues.
The guava based trim uses the unicode definition of a white space which is different than the java trim as can be seen here
A queue name with a non-breaking white space will thus still cause the same "Metrics source XXX already exists!" MetricsException.