Dealing with case insensitivity

Bryce McKinlay bryce@waitaki.otago.ac.nz
Fri Mar 15 13:10:00 GMT 2002


Tom Tromey wrote:

>>>>>>"Jim" == Jim Peters <jim@uazu.net> writes:
>>>>>>
>
>Jim> That means that the problem could be worked around by doing a
>Jim> directory listing to check that the case is what we hoped it was.
>Jim> This overhead would only need to be turned on for certain filesystems.
>Jim> (Also, the directory listings could be cached).
>
>I don't know whether this will work or not.  I think the problem is
>that we don't really know much about the bug.  Nobody has debugged it
>and then reported all the salient facts.  (There was a patch once, but
>it was unsuitable for inclusion in the compiler, and as I recall came
>without a full analysis of the bug.)
>

The basic problem is not that it parses extra files, but rather that it 
opens the same file twice under different names (which vary only by 
case). This results in an error about the same class being redefined in 
a different source file. It would be easy to fix, I think, if there was 
a way to tell if two files, opened by different names, are really the 
same. On unix there are device/inode numbers but apparantly these arn't 
supported on cygwin and some filesystems.

The underlying issue is that it doesn't know whether its looking for a 
class or a package when it sees something like "new 
java.awt.image.Foo()" - afaik there is no way to know there isn't a 
java.awt.image class defined in java/awt/image.java with an inner class 
Foo? I'd be interested to know how Jikes handles this.

regards

Bryce.




More information about the Java mailing list