> If tests pass after fixing the behavior on an empty conf, do you have an issue with changing the semantics of these utility functions so long as the new behavior is clearly documented in the javadoc?
Configuration is a public class and is not a part of fs or hdfs. Trimming the string values may make sense in fs/hdfs paths but it may not for the other usages. Personally, I wish the trimming was done in the beginning. Unfortunately, it was not. If we change it now, then it breaks existing semantics. I think that users rarely use leading or tailing spaces in configuration values but we cannot break them.
When I worked on
HADOOP-2461, I think that the property names should be trimmed but not the values. Otherwise, it forbids the potential use of leading and trailing spaces. If there is a need, the codes using the conf values should do the trimming. In this issue, only the values for dfs.data.dir should be trimmed.
If a trimmed version of getStrings(..) is needed, I think it is better to provide new methods, say getTrimmedStrings(..) in Configuration and StringUtils but not changing the existing ones.