JDK-4103608 : java.io.File.getParent should remove redundant separator chars
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 1.1.5
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1998-01-13
  • Updated: 1999-01-15
  • Resolved: 1999-01-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.2.0 1.2beta4Fixed
Related Reports
Relates :  
Relates :  
Description

Name: dgC58589			Date: 01/13/98


1,2,3. the code:

File f = new File("c:\\a\\b");

shows
getParent() c:\a -- as expected,
getAbsolutePath() c:\a\b  (also as expected)
getCanonicalPath() c:\a\b (also as expected)

but the code

File f = new File("c:\\a\\b\\");

shows
getParent() c:\a\b -- an ERROR
getAbsolutePath() c:\a\bgetCanonicalPath() c:\a\b (the same as parent!)

4. N/A

5. It might seems like bug 4065506 but it is different errorneous behaviour!
(Review ID: 23026)
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic FIXED IN: 1.2beta4 INTEGRATED IN: 1.2beta4
14-06-2004

EVALUATION Fixed by the general rewrite of java.io.File in JDK 1.2beta4 (4131169). -- mr@eng 6/18/1998
18-06-1998