Updated Upstream (Bukkit/CraftBukkit) (#7045)

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:
ffd8b289 PR-687: Fix NPE from previous commits

CraftBukkit Changes:
3c2af1b7 SPIGOT-6831: Fix llama strength crash
This commit is contained in:
Noah van der Aa 2021-12-06 13:43:46 +01:00
parent 4519c88cb7
commit 6de2d9794c
4 changed files with 3 additions and 53 deletions

View File

@ -1,50 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 5 Dec 2021 15:19:10 +0000
Subject: [PATCH] Revert "#686: Fix contains for default section generating
real sections"
This commit causes an NPE when getting from the config in some states,
given upstream issue and PR in the works, I have 0 inclination to debug
this
This reverts commit e4358b8217126bbcc3a38b0d17097ad5ab87c50a.
diff --git a/src/main/java/org/bukkit/configuration/MemorySection.java b/src/main/java/org/bukkit/configuration/MemorySection.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/configuration/MemorySection.java
+++ b/src/main/java/org/bukkit/configuration/MemorySection.java
@@ -0,0 +0,0 @@ public class MemorySection implements ConfigurationSection {
int i1 = -1, i2;
ConfigurationSection section = this;
while ((i1 = path.indexOf(separator, i2 = i1 + 1)) != -1) {
- if (section == null || !section.contains(path.substring(i2, i1), true)) {
+ section = section.getConfigurationSection(path.substring(i2, i1));
+ if (section == null) {
return def;
}
- section = section.getConfigurationSection(path.substring(i2, i1));
}
String key = path.substring(i2);
diff --git a/src/test/java/org/bukkit/configuration/ConfigurationSectionTest.java b/src/test/java/org/bukkit/configuration/ConfigurationSectionTest.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/test/java/org/bukkit/configuration/ConfigurationSectionTest.java
+++ b/src/test/java/org/bukkit/configuration/ConfigurationSectionTest.java
@@ -0,0 +0,0 @@ public abstract class ConfigurationSectionTest {
assertTrue(section.contains("doenst-exist-two", false));
}
- @Test
- public void testContainsDoesNotCreateSection() {
- ConfigurationSection section = getConfigurationSection();
- section.addDefault("notExistingSection.Value", "Test String");
-
- assertFalse(section.contains("notExistingSection", true));
- assertFalse(section.contains("notExistingSection.Value", true));
- assertFalse(section.contains("notExistingSection", true));
- }
-
@Test
public void testIsSet() {
ConfigurationSection section = getConfigurationSection();

@ -1 +1 @@
Subproject commit 8814411100e91e323a23a9a6355fa7d28e091054
Subproject commit 059e48d0b4666138c4a8330ee38310d74824a848

@ -1 +1 @@
Subproject commit e4358b8217126bbcc3a38b0d17097ad5ab87c50a
Subproject commit ffd8b28939b4ec84855f8a10c93463ec113def13

@ -1 +1 @@
Subproject commit f49e9d1932ece8e5a5aaf259d7221e6f99647721
Subproject commit 3c2af1b7f5b43ed91c2e4096f1e164c551111074