From b4a77a84a7fb6280482de352874a50948ca7d33e Mon Sep 17 00:00:00 2001 From: Noah van der Aa Date: Mon, 6 Dec 2021 13:43:46 +0100 Subject: [PATCH] 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 --- ...ontains-for-default-section-generati.patch | 50 ------------------- work/BuildData | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 4 files changed, 3 insertions(+), 53 deletions(-) delete mode 100644 patches/api/0346-Revert-686-Fix-contains-for-default-section-generati.patch diff --git a/patches/api/0346-Revert-686-Fix-contains-for-default-section-generati.patch b/patches/api/0346-Revert-686-Fix-contains-for-default-section-generati.patch deleted file mode 100644 index 203f31afb5..0000000000 --- a/patches/api/0346-Revert-686-Fix-contains-for-default-section-generati.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -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 09f1debef5fad469a05a0d97b740a7310890fd64..90cc523f658f3632d4dbdec3a5d2ce7c3c02341f 100644 ---- a/src/main/java/org/bukkit/configuration/MemorySection.java -+++ b/src/main/java/org/bukkit/configuration/MemorySection.java -@@ -251,10 +251,10 @@ 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 bfaacbaa33d05042eb5e8eea46e6a884d40e1aae..1e529928393e1554bf02d2bfb1e1c3c7e4def07e 100644 ---- a/src/test/java/org/bukkit/configuration/ConfigurationSectionTest.java -+++ b/src/test/java/org/bukkit/configuration/ConfigurationSectionTest.java -@@ -110,16 +110,6 @@ 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(); diff --git a/work/BuildData b/work/BuildData index 8814411100..059e48d0b4 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit 8814411100e91e323a23a9a6355fa7d28e091054 +Subproject commit 059e48d0b4666138c4a8330ee38310d74824a848 diff --git a/work/Bukkit b/work/Bukkit index e4358b8217..ffd8b28939 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit e4358b8217126bbcc3a38b0d17097ad5ab87c50a +Subproject commit ffd8b28939b4ec84855f8a10c93463ec113def13 diff --git a/work/CraftBukkit b/work/CraftBukkit index f49e9d1932..3c2af1b7f5 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit f49e9d1932ece8e5a5aaf259d7221e6f99647721 +Subproject commit 3c2af1b7f5b43ed91c2e4096f1e164c551111074