This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Dealing with case insensitivity
- To: Per Bothner <per at bothner dot com>
- Subject: Re: Dealing with case insensitivity
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Date: Wed, 10 Oct 2001 21:36:53 +1300
- Cc: java at gcc dot gnu dot org
On Wednesday, October 10, 2001, at 08:32 PM, Per Bothner wrote:
> Hm. Would you get the same problem if the "Gnu" class were renamed
> "gnu"?
> I.e is this a case insensitivity problem, or a problem because we have
> both
> a directory (package ) named gnu/java, which also looking for Gnu.java?
> Both seem like they might be in retrospet mistakes, but renaming the
> Gnu to to something might be an easy work-around.
In this particular case it isn't really clear to me why "gnu.java" is
attempting to being loaded, since nothing in gnu.java.security.provider
tries to import or reference any gnu.* type. However, the problem in
general is real enough - last time I tried to build on darwin I got the
same error in AWT because of the java.awt.Image class being confused
with the java.awt.image package.
I don't think there is a way to prevent the compiler trying to load the
package names as classes, since inner scopes must be searched first for
type declarations. ie if a piece of code declares say "foo.Bar b", the
compiler must try to load foo.java first, before it tries "foo" as a
top-level package name. Presumably, in this situation other java
compilers end up loading foo.java also, but just forget about it when
they realize it defines "Foo" and not "foo".
regards
Bryce.