findLoadedClass

breed at almaden.ibm.com breed at almaden.ibm.com
Thu Sep 17 09:38:20 PDT 1998


ClassLoader.findLoadedClass() as implemented is wrong.  (As noted in the
code.)  While the JDK 1.1 was silent as to what it did, the 1.2 doc is
clear.  Basically it should return a reference to the class if it is loaded
or null if not.  I use it in my classloader in loadClass to check if the
class is loaded before trying to define the class, but with the current
implementation an infinitely recursive call results...

Looking into the code there didn't seem to be a nice way using native code
to check for a class being loaded without causing creation of a class entry
for the class being looked for.  (Boy my english suxs!)  I would be glad
fix it if somebody could suggest the best way of checking for a loaded
class.

ben




More information about the kaffe mailing list