mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8229785: MethodType::fromMethodDescriptorString should require security permission if loader is null
Reviewed-by: vromero
This commit is contained in:
parent
5dc5bc881a
commit
5d397eea9f
9 changed files with 250 additions and 9 deletions
|
@ -90,9 +90,7 @@ public class BytecodeDescriptor {
|
|||
i[0] = endc+1;
|
||||
String name = str.substring(begc, endc).replace('/', '.');
|
||||
try {
|
||||
return (loader == null)
|
||||
? Class.forName(name, false, null)
|
||||
: loader.loadClass(name);
|
||||
return Class.forName(name, false, loader);
|
||||
} catch (ClassNotFoundException ex) {
|
||||
throw new TypeNotPresentException(name, ex);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue