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:
parent
04897b1333
commit
b4a77a84a7
4 changed files with 3 additions and 53 deletions
|
@ -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 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();
|
|
@ -1 +1 @@
|
|||
Subproject commit 8814411100e91e323a23a9a6355fa7d28e091054
|
||||
Subproject commit 059e48d0b4666138c4a8330ee38310d74824a848
|
|
@ -1 +1 @@
|
|||
Subproject commit e4358b8217126bbcc3a38b0d17097ad5ab87c50a
|
||||
Subproject commit ffd8b28939b4ec84855f8a10c93463ec113def13
|
|
@ -1 +1 @@
|
|||
Subproject commit f49e9d1932ece8e5a5aaf259d7221e6f99647721
|
||||
Subproject commit 3c2af1b7f5b43ed91c2e4096f1e164c551111074
|
Loading…
Reference in a new issue