From 8ac06d8a477316bd512323367b8ec93a5e652942 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 11 Aug 2009 09:25:35 -0600 Subject: [PATCH] initialize classloader map if necessary in Avian_java_lang_ClassLoader_defineClass --- src/builtin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/builtin.cpp b/src/builtin.cpp index c3d779b3de..6c7dbb74e4 100644 --- a/src/builtin.cpp +++ b/src/builtin.cpp @@ -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); }