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: 6630027
Votes 0
Synopsis URLClassLoader should have an explicit disposal mechanism
Category java:classes_net
Reported Against
Release Fixed
State 3-Accepted, bug
Priority: 3-Medium
Related Bugs 6558476 , 4950148
Submit Date 15-NOV-2007
Description
This is a special case of of 4950148 which is arguably worth handling separately.

The problems of closing a ClassLoader are understood and described in 4950148.

However, until that bug is fixed, it would be useful to have URLClassLoader implement
Closeable and close() with a more limited specification that it should close any open JarFiles which it is using.  If and when ClassLoader itself implements Closeable, then URLClassLoader.close() can call super.close() to have all the right additional things happen.

See 6558476 for a problem reported against javac, which boils down to the same problem. Currently, the proposed fix for javac is to try and use reflection to access the private fields containing the jar files in order to close them. It would be better if URLClassLoader provided that functionality directly.
Posted Date : 2007-11-15 00:34:50.0
Work Around
N/A
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang