Skip to content

Commit

Permalink
Bump paperweight-userdev and mapping-io
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Nov 26, 2023
1 parent 1106fd8 commit 81b1959
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ 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"
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" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,22 @@ static ReflectionRemapperImpl fromMappingTree(
final Map<String, String> 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<String, String> 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)
);
Expand Down

0 comments on commit 81b1959

Please sign in to comment.