geforkt von Mirrors/Paper
Be more resilient to asynchronous package loads like URLClassLoader
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
1cee26089b
Commit
a598aa855b
@ -104,10 +104,16 @@ final class PluginClassLoader extends URLClassLoader {
|
|||||||
if (dot != -1) {
|
if (dot != -1) {
|
||||||
String pkgName = name.substring(0, dot);
|
String pkgName = name.substring(0, dot);
|
||||||
if (getPackage(pkgName) == null) {
|
if (getPackage(pkgName) == null) {
|
||||||
if (manifest != null) {
|
try {
|
||||||
definePackage(pkgName, manifest, url);
|
if (manifest != null) {
|
||||||
} else {
|
definePackage(pkgName, manifest, url);
|
||||||
definePackage(pkgName, null, null, null, null, null, null, null);
|
} else {
|
||||||
|
definePackage(pkgName, null, null, null, null, null, null, null);
|
||||||
|
}
|
||||||
|
} catch (IllegalArgumentException ex) {
|
||||||
|
if (getPackage(pkgName) == null) {
|
||||||
|
throw new IllegalStateException("Cannot find package " + pkgName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren