Skip to content

Commit 6fd607c

Browse files
authored
Merge pull request #186 from jamesnetherton/XALANJ-2664
XALANJ-2664: Determine the parent ClassLoader for ByteArrayClassLoader
2 parents c8ddaad + 7debfd2 commit 6fd607c

File tree

1 file changed

+3
-2
lines changed
  • xalan/src/main/java/org/apache/xalan/xsltc/compiler

1 file changed

+3
-2
lines changed

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

+3-2
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)