Updated Upstream (Bukkit/CraftBukkit) (#5794)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
7e29f765 SPIGOT-6502: Loading a class from a library of another plugin resulted in a ClassCastException.

CraftBukkit Changes:
296df566 Remove outdated build delay.
This commit is contained in:
Jake Potrebic 2021-06-10 21:35:13 -07:00
parent 5cf7330459
commit 7369abbfa2
5 changed files with 7 additions and 7 deletions

View file

@ -76,11 +76,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private final File file;
private final JarFile jar;
@@ -0,0 +0,0 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
}
if (checkGlobal) {
// This ignores the libraries of other plugins, unless they are transitive dependencies.
- Class<?> result = loader.getClassByName(name, resolve, description);
+ Class<?> result = loader.getClassByName(name, resolve, description, this); // Paper - prioritize self
if (result != null) {
PluginDescriptionFile provider = ((PluginClassLoader) result.getClassLoader()).description;
// If the class was loaded from a library instead of a PluginClassLoader, we can assume that its associated plugin is a transitive dependency and can therefore skip this check.
if (result != null && result.getClassLoader() instanceof PluginClassLoader) {

View file

@ -270,7 +270,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class Main {
}
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
- Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L);
+ Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper

View file

@ -339,7 +339,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper
}
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
@@ -0,0 +0,0 @@ public class Main {
System.out.println("Unable to read system info");
}

@ -1 +1 @@
Subproject commit 04df07fe9a45f382bedd4ee83948382d3e7baae8
Subproject commit 7e29f7654411f0a17ebbcc2c3f6a7dfe93bff39e

@ -1 +1 @@
Subproject commit fae895ac110a830e4bbd5cc9eadbf70104ce215e
Subproject commit 296df56673771692593156995684ab8041925d9d