Bug 5059

Summary: IPath#append API different then implementation
Product: [Eclipse Project] Platform Reporter: Michael Valenta <Michael.Valenta>
Component: ResourcesAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Michael Valenta CLA 2001-10-17 16:53:38 EDT
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.
Comment 1 John Arthorne CLA 2001-10-17 18:34:35 EDT
Yikes!
Comment 2 John Arthorne CLA 2001-10-18 10:03:39 EDT
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.