This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bug in bytecode compiler 3.3?


The following code compiles (with option -C) properly to bytecode in 3.2,
but doesn't in 3.3 (on minGW):

--------------------------------------------cut-here------------------------
---------------
package mytest;
public class MyTest
{
    String errorMsg;
    public void fatalError(ExceptionX e)
    {
        errorMsg = e.toString ();
    }
}
class ExceptionX extends Exception {}
--------------------------------------------cut-here------------------------
---------------

    [javac] C:\devroot\tst\lib-xmlrpc-test\src\mytest/mytest.java:3: error:
Class `mytest.MyTest' already defined in C:\
devroot\tst\lib-xmlrpc-test\src\mytest\MyTest.java:3.
    [javac] C:\devroot\tst\lib-xmlrpc-test\src\mytest/mytest.java:12: error:
Class `mytest.ExceptionX' already defined i
n C:\devroot\tst\lib-xmlrpc-test\src\mytest\MyTest.java:12.

The problem only occurs when the file is placed in the folder "mytest",
which has the same name as the class itself and the package, ignoring case.
If it is placed in a differently named folder, the bug disappears.

Since this kind of naming situation occurs quite frequently, it affects
quite a bit of code.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]