Allow empty paths in namespaced keys (#12687)

This commit is contained in:
Lulu13022002
2025-06-21 07:56:45 +02:00
committed by GitHub
parent d61a51e81e
commit 29fc853271
4 changed files with 28 additions and 81 deletions

View File

@@ -34,16 +34,6 @@ public class NamespacedKeyTest {
assertThrows(IllegalArgumentException.class, () -> NamespacedKey.fromString(null));
}
@Test
public void testEmptyNamespace() {
assertThrows(IllegalArgumentException.class, () -> new NamespacedKey("", "foo").toString());
}
@Test
public void testEmptyKey() {
assertThrows(IllegalArgumentException.class, () -> new NamespacedKey("minecraft", "").toString());
}
@Test
public void testInvalidNamespace() {
assertThrows(IllegalArgumentException.class, () -> new NamespacedKey("minecraft/test", "foo").toString());