mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8241815: Unnecessary calls to SystemDictionaryShared::define_shared_package
Avoid calling ClassLoaders.definePackage during loading of shared classes originated from the module image since java.lang.Package for named modules are automatically defined. Reviewed-by: mchung, lfoltan
This commit is contained in:
parent
03f8e6ccd8
commit
18c43241fb
4 changed files with 6 additions and 63 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -132,16 +132,6 @@ public class ClassLoaders {
|
|||
PlatformClassLoader(BootClassLoader parent) {
|
||||
super("platform", parent, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the VM to support define package for AppCDS.
|
||||
*
|
||||
* Shared classes are returned in ClassLoader::findLoadedClass
|
||||
* that bypass the defineClass call.
|
||||
*/
|
||||
private Package definePackage(String pn, Module module) {
|
||||
return JLA.definePackage(this, pn, module);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -194,16 +184,6 @@ public class ClassLoaders {
|
|||
ucp.addFile(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the VM to support define package for AppCDS
|
||||
*
|
||||
* Shared classes are returned in ClassLoader::findLoadedClass
|
||||
* that bypass the defineClass call.
|
||||
*/
|
||||
private Package definePackage(String pn, Module module) {
|
||||
return JLA.definePackage(this, pn, module);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the VM to support define package for AppCDS
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue