initialize classloader map if necessary in Avian_java_lang_ClassLoader_defineClass

This commit is contained in:
Joel Dice 2009-08-11 09:25:35 -06:00
parent df1aee5981
commit 8ac06d8a47

View File

@ -186,6 +186,12 @@ Avian_java_lang_ClassLoader_defineClass
t->m->heap->free(buffer, length);
if (c) {
if (classLoaderMap(t, loader) == 0) {
PROTECT(t, c);
object map = makeHashMap(t, 0, 0);
set(t, loader, ClassLoaderMap, map);
}
hashMapInsert(t, classLoaderMap(t, loader), className(t, c), c,
byteArrayHash);
}