Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6759775
Votes 0
Synopsis RegularFileObject.inferBinaryName gives bad result on empty path
Category java:compiler
Reported Against
Release Fixed 7(b39), 6-open(b13) (Bug ID:2168858)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs
Submit Date 15-OCT-2008
Description
Independent of whether or not empty path elements should be allowed on a path, if an empty path element is found, then RegularFileObject.inferBinaryName will give an incorrect result for a file found from a directory (e.g. a classes/ directory) found elsewhere on the path.
Posted Date : 2008-10-15 16:06:29.0
Work Around
N/A
Evaluation
If a class is found in a classes/directory, then JavaFileObject.inferBinaryName will be provided by RegularFileObject.inferBinaryName.  There is no reliable way to determine the binary name, and so the method works imperfectly by looking for the first directory on the path whose path is a prefix of the path for the class in question.   An empty path provides a trivial and incorrect match.

The solution is to treat empty path elements, if they occur, as user.dir.

A separate issue to be resolved is whether empty path elements should be allowed at all.
Posted Date : 2008-10-15 16:06:29.0

noreg-other since the fix is covered by running testgetallmemberes in particular modes, and because we will probably consider disallowing empty elements in paths, which would invalidate any explicit test for this bug fix.
Posted Date : 2008-10-16 14:35:18.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang