This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Dealing with case insensitivity
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: tromey at redhat dot com
- Cc: Jim Peters <jim at uazu dot net>, java at gcc dot gnu dot org
- Date: Sat, 16 Mar 2002 10:10:09 +1300
- Subject: Re: Dealing with case insensitivity
- References: <20020315090611.A23916@uazu.net> <87g0317rtg.fsf@creche.redhat.com>
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.