JDK-4037490 : Only one class file generated for sourcefiles whose names differ only in case
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.0.2,1.1,1.1.3,1.1.8,1.2.1,1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_95,windows_nt
  • CPU: x86
  • Submitted: 1997-03-07
  • Updated: 2001-03-28
  • Resolved: 2001-03-28
Related Reports
Duplicate :  
Relates :  
Description

Name: mc57594			Date: 03/07/97


Bug 1:

Create a .java file with two class definitions whose names differ
only in case. Compile it. Only one .class file is generated. The
compiler should generate a warning in this case. (It can,
after all, examine the directory to find the case-sensitive file
name even if the OS ignores case when opening the file.)

Bug 2:

Create a foo.java file with a foo class defined in it.
Compile it. Rename the class file too bogus.class. The VM
happily lets me instantiate an instance of class bogus and
send it messages. The VM should at minimum check that the
class name it thinks it loaded is the one defined in the
.class file. This would solve the eariler problem as well
(or at least give me a reasonable error message).


company - Holub Associates , email - ###@###.###
======================================================================

Comments
WORK AROUND Name: mc57594 Date: 03/07/97 Use the Symantec VM, which prints an error in the above situation. ======================================================================
11-06-2004

PUBLIC COMMENTS .
10-06-2004

EVALUATION Bug 2 has been fixed in the 1.2 VM. The compiler should generate error messages which are more informative if the file system is munging names behind the scene. However, this is a low priority ease of use request. david.stoutamire@Eng 1997-08-07 Bug 1 reproduced in JDK 1.3.0rc1-T on Windows NT 4.0 SP6a. william.maddox@Eng 2000-01-31
07-08-1997