Skip to content

Commit 7debfd2

Browse files
XALANJ-2664: Determine the parent ClassLoader for ByteArrayClassLoader
1 parent c8ddaad commit 7debfd2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • xalan/src/main/java/org/apache/xalan/xsltc/compiler

xalan/src/main/java/org/apache/xalan/xsltc/compiler/XSLTC.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ public void dumpClass(JavaClass clazz) {
860860
// check that the, class to be serialized to filesystem, is of the valid format.
861861
// check with the native JVM class loader
862862
byte[] classByteArray = clazz.getBytes();
863-
ByteArrayClassLoader classLoader = new ByteArrayClassLoader(classByteArray);
863+
ByteArrayClassLoader classLoader = new ByteArrayClassLoader(classByteArray, ObjectFactory.findClassLoader());
864864
Class clz = classLoader.findClass(clazz.getClassName());
865865

866866
clazz.dump(new BufferedOutputStream(
@@ -881,7 +881,8 @@ public class ByteArrayClassLoader extends ClassLoader {
881881

882882
byte[] ba;
883883

884-
public ByteArrayClassLoader(byte[] bArray) {
884+
public ByteArrayClassLoader(byte[] bArray, ClassLoader parent) {
885+
super(parent);
885886
ba = bArray;
886887
}
887888

0 commit comments

Comments
 (0)