Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4954586
Votes 0
Synopsis inner class file is not generated
Category java:compiler
Reported Against 1.4.2
Release Fixed
State 5-Cause Known, bug
Priority: 4-Low
Related Bugs 4944478
Submit Date 14-NOV-2003
Description
In the attached java program, there are two inner classes, one of them anonymous.

The class file for the anonymous inner class is not generated because the class can never be reached.

However, for the non-anonynous inner class, javac generates a wrapper
for its constructor, using the anonymous inner class as an argument.

If the VM tries to eagerly load the anonymous inner class, a ClassNotFoundException is thrown.  (see 4944478)

It would be friendlier if javac generated the class. 
Work Around
N/A
Evaluation
Agreed.

  xxxxx@xxxxx   2003-11-14

Or don't refer to the anonymous class.
  xxxxx@xxxxx   10/25/04 22:34 GMT
Comments
  
  Include a link with my name & email   

Submitted On 09-APR-2005
rolf
Please fix this, either in the compiler or in the runtime! I just got burnt by this bug and wasted a lot of time tracking it down. The problem is that I had an application which worked fine in a development environment but gave obscure NoClassDefFoundErrors when built and deployed using release scripts.



PLEASE NOTE: JDK6 is formerly known as Project Mustang