This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 25245 - Inner class file name error on generation of inner class file
Summary: Inner class file name error on generation of inner class file
Status: CLOSED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: -FFJ-
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-27 19:52 UTC by gaikokujin
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gaikokujin 2002-06-27 19:52:13 UTC
This error concerns capitalization change of first 
character of inner class name, from upper to lower case, 
only.  I followed these customer supplied instructions and 
reproduced the resulting compile error exactly as they 
described it:

Problem: class files not renamed when case of class name 
changes

Test case: This file below was originally named 
class "productElement" with an initial capital "P". The 
class was compiled, resulting in a compiled file 
AmazonQueryResult$ProductElement.class. The case change
was made to the productElement class and the class was 
recompiled successfully. A new version of 
AmazonQueryResult$ProductElement.class was created. 
However, the case of the generated .class file was not 
changed to reflect the new class name.

About box:
Forte for Java 4, Enterprise Edition (Build 020521)
Java VM 1.4.0-b92 on Windows

fragment of code that shows the error:

AmazonQueryResult queryResult = new AmazonQueryResult();
queryResult.catalog.product.title = "title";

The second line generates the following compile error:
 org/dyck/bookdatabase/amazonqueryservice/AmazonQuery.java 
[69:1] cannot access
 
org.dyck.bookdatabase.amazonqueryservice.AmazonQueryResult.
productElement file
 
org\dyck\bookdatabase\amazonqueryservice\AmazonQueryResult$
productElement.class not found
       queryResult.catalog.product.title = "title";

Removing the .class files and rebuilding 
AmazonQueryResult.java produces a class file for the inner 
class with the correct case.

 >AmazonQueryResult.java
 >
 >/*
 > * AmazonQueryResult.java
 > *
 > * Created on June 17, 2002, 1:23 AM
 > */
 >
 >package org.dyck.bookdatabase.amazonqueryservice;
 >
 >/** Data returned from the Amazon XML query interface.
 > * Current as of 6/17/2002.
 > * @author Timothy Dyck
 > */
 >
 >public class AmazonQueryResult {
 >
 >   /** member variables for AmazonQueryResult
 >    */
 >   public CatalogElement catalog = new CatalogElement();
 >
 >   /** class for XML catalog element
 >    */
 >   public class CatalogElement {
 >       /** member variables for CatalogElement
 >        */
 >       public String product_group;
 >       public productElement product = new productElement
();
 >       /** instantiate class
 >        */
 >       public CatalogElement() {
 >       }
 >   }  // public class CatalogElement
 >
 >   /** class for XML product element
 >    */
 >   public class productElement {
 >       /** member variables
 >        */
 >       public String ranking;
 >       public String title;
 >       public String asin;
 >       public String author;
 >       public String image;
 >       public String small_image;
 >       public String our_price;
 >       public String list_price;
 >       public String release_date;
 >       public String binding;
 >       public String rating;
 >       public String availability;
 >       public String director;
 >       public String tagged_url;
 >       /** instantiate class
 >        */
 >       public productElement() {
 >       }
 >   }  // public class ProductElement
 >
 >   /** instantiate class
 >    */
 >   public AmazonQueryResult() {
 >   }
 >
 >}  // public class AmazonQueryResult
Comment 1 Tomas Hurka 2002-06-28 15:08:52 UTC
This is a bug in JDK. It works the same way outside of NetBeans, using
commandline javac. Please report it to JDK team.
Comment 2 Svata Dedic 2002-06-28 15:21:14 UTC
Just a little detailed explanation: it seems that the JVM uses
something like C library function fopen(theFileName, "w+") to open the
file descriptor. There is already a file Something$Foo and the JVM
calls the function as fopen("Something$foo", "w+"). Because for
Windows, "Something$Foo" and "Something$foo" are same filenames, the
existing file is found, truncated to zero length and written into.
The class is written into "Something$Foo", but when javac searches for
a file it seems to use case-sensitive comparisons, so reports the
class as missing.
Comment 3 Tomas Hurka 2002-06-28 15:35:43 UTC
BTW: For command-line javac the problem exists for top level classes
as well.
Comment 4 Quality Engineering 2003-07-01 13:11:48 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.
Comment 5 Quality Engineering 2003-07-01 13:18:34 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.