Community
Participate
Working Groups
In the API for IPath, the comment for the append(String path) method states: "If the given path has a trailing separator, the result will have a trailing separator." This, to me implies that the converse should be true (i.e if path doesn't have a trailing separatore, neither will the result). This however, is not the case. The appeand method in path uses the separators of the path for the new path. Either the behavior or the comment should be changes to reflect the desired behaviors.
Yikes!
This was a behaviour regression in 2.0 stream after changing the path implementation. The case of adding a single segment was painstakingly optimized and lost the preservation of the trailing separator. A fix has been released, and several tests have been added to cover this case. The test suite wasn't catching this because it relies on equality testing, which ignores the trailing separator for path.