diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 86a4d9e..0a088e8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,7 @@ mappingsTestDevBundle = "1.20.2-R0.1-SNAPSHOT" indra-common = { group = "net.kyori", name = "indra-common", version.ref = "indra" } indra-licenser-spotless = { group = "net.kyori", name = "indra-licenser-spotless", version.ref = "indra" } indra-publishing-sonatype = { group = "net.kyori", name = "indra-publishing-sonatype", version.ref = "indra" } -paperweight-userdev = { group = "io.papermc.paperweight.userdev", name = "io.papermc.paperweight.userdev.gradle.plugin", version = "1.5.9" } +paperweight-userdev = { group = "io.papermc.paperweight.userdev", name = "io.papermc.paperweight.userdev.gradle.plugin", version = "1.5.10" } mappingsTestDevBundle = { module = "io.papermc.paper:dev-bundle", version.ref = "mappingsTestDevBundle" } memoryMeasurer = "com.volkhart.memory:measurer:0.2-SNAPSHOT" @@ -19,7 +19,7 @@ junit-jupiter-api = "org.junit.jupiter:junit-jupiter-api:5.10.1" junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine" } checker-qual = "org.checkerframework:checker-qual:3.40.0" -mapping-io = { group = "net.fabricmc", name = "mapping-io", version = "0.4.2" } +mapping-io = { group = "net.fabricmc", name = "mapping-io", version = "0.5.0" } cloud-bom = { group = "cloud.commandframework", name = "cloud-bom", version = "1.8.4" } cloud-paper = { module = "cloud.commandframework:cloud-paper" } diff --git a/src/main/java/xyz/jpenilla/reflectionremapper/ReflectionRemapperImpl.java b/src/main/java/xyz/jpenilla/reflectionremapper/ReflectionRemapperImpl.java index 41e5bc5..4a1f4d5 100644 --- a/src/main/java/xyz/jpenilla/reflectionremapper/ReflectionRemapperImpl.java +++ b/src/main/java/xyz/jpenilla/reflectionremapper/ReflectionRemapperImpl.java @@ -109,22 +109,22 @@ static ReflectionRemapperImpl fromMappingTree( final Map fields = new HashMap<>(); for (final MappingTree.FieldMapping field : cls.getFields()) { fields.put( - pool.string(field.getName(fromNamespace)), - pool.string(field.getName(toNamespace)) + pool.string(Objects.requireNonNull(field.getName(fromNamespace))), + pool.string(Objects.requireNonNull(field.getName(toNamespace))) ); } final Map methods = new HashMap<>(); for (final MappingTree.MethodMapping method : cls.getMethods()) { methods.put( - pool.string(methodKey(method.getName(fromNamespace), method.getDesc(toNamespace))), - pool.string(method.getName(toNamespace)) + pool.string(methodKey(Objects.requireNonNull(method.getName(fromNamespace)), Objects.requireNonNull(method.getDesc(toNamespace)))), + pool.string(Objects.requireNonNull(method.getName(toNamespace))) ); } final ClassMapping map = new ClassMapping( - cls.getName(toNamespace).replace('/', '.'), - cls.getName(fromNamespace).replace('/', '.'), + Objects.requireNonNull(cls.getName(toNamespace)).replace('/', '.'), + Objects.requireNonNull(cls.getName(fromNamespace)).replace('/', '.'), Collections.unmodifiableMap(fields), Collections.unmodifiableMap(methods) );