mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8343427: Class file load hook crashes on archived classes from multi-release JARs
Reviewed-by: dholmes, iklam
This commit is contained in:
parent
f1b5a6e66e
commit
d752f19611
7 changed files with 239 additions and 1 deletions
|
@ -1685,6 +1685,15 @@ public abstract class ClassLoader {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by VM for reading class bytes.
|
||||
*/
|
||||
private byte[] getResourceAsByteArray(String name) throws IOException {
|
||||
Objects.requireNonNull(name);
|
||||
InputStream is = getResourceAsStream(name);
|
||||
return is != null ? is.readAllBytes() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open for reading, a resource of the specified name from the search path
|
||||
* used to load classes. This method locates the resource through the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue