From 93f66fc2e5edafad882191c40dc2c3ec2d582c65 Mon Sep 17 00:00:00 2001 From: "Taro L. Saito" Date: Tue, 2 Aug 2011 15:31:57 +0900 Subject: [PATCH] comment --- src/main/java/org/xerial/snappy/SnappyLoader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/xerial/snappy/SnappyLoader.java b/src/main/java/org/xerial/snappy/SnappyLoader.java index 40ec2a2..7e29779 100755 --- a/src/main/java/org/xerial/snappy/SnappyLoader.java +++ b/src/main/java/org/xerial/snappy/SnappyLoader.java @@ -205,7 +205,7 @@ public class SnappyLoader preloadClassByteCode.add(getByteCode(String.format("/%s.class", each.replaceAll("\\.", "/")))); } - // Create SnappyNative class from a byte code + // Create SnappyNativeLoader class from a byte code Class< ? > classLoader = Class.forName("java.lang.ClassLoader"); Method defineClass = classLoader.getDeclaredMethod("defineClass", new Class[] { String.class, byte[].class, int.class, int.class, ProtectionDomain.class }); @@ -218,6 +218,7 @@ public class SnappyLoader // Create a new class using a ClassLoader#defineClass defineClass.invoke(rootClassLoader, nativeLoaderClassName, byteCode, 0, byteCode.length, pd); + // And also define dependent classes in the root class loader for (int i = 0; i < classesToPreload.length; ++i) { byte[] b = preloadClassByteCode.get(i); defineClass.invoke(rootClassLoader, classesToPreload[i], b, 0, b.length, pd);