Skip to content

Commit

Permalink
Merge pull request #186 from jamesnetherton/XALANJ-2664
Browse files Browse the repository at this point in the history
XALANJ-2664: Determine the parent ClassLoader for ByteArrayClassLoader
  • Loading branch information
jkesselm authored Apr 18, 2024
2 parents c8ddaad + 7debfd2 commit 6fd607c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ public void dumpClass(JavaClass clazz) {
// check that the, class to be serialized to filesystem, is of the valid format.
// check with the native JVM class loader
byte[] classByteArray = clazz.getBytes();
ByteArrayClassLoader classLoader = new ByteArrayClassLoader(classByteArray);
ByteArrayClassLoader classLoader = new ByteArrayClassLoader(classByteArray, ObjectFactory.findClassLoader());
Class clz = classLoader.findClass(clazz.getClassName());

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

byte[] ba;

public ByteArrayClassLoader(byte[] bArray) {
public ByteArrayClassLoader(byte[] bArray, ClassLoader parent) {
super(parent);
ba = bArray;
}

Expand Down

0 comments on commit 6fd607c

Please sign in to comment.