Bug 5059 - IPath#append API different then implementation
Summary: IPath#append API different then implementation
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-17 16:53 EDT by Michael Valenta CLA
Modified: 2001-10-18 10:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.