Skip to content

Commit e3dc72d

Browse files
authored
Correctly lowercase lvt (#36)
Codebook uses toLowerCase for fully upper-cased type names like UUID. The call uses the default locale, which might incorrectly map characters like 'I' to lowercase versions that are not 'i'. This prevents further patching of the mache sources. Correctly specify the ROOT locale instead, making the logic independent from the JVM default locale.
1 parent 692af5a commit e3dc72d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • codebook-lvt/src/main/java/io/papermc/codebook/lvt

codebook-lvt/src/main/java/io/papermc/codebook/lvt/LvtUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public static String parseSimpleTypeName(final String simpleName) {
138138
// UUID -> uuid
139139
// AABB -> aabb
140140
if (LvtUtil.isStringAllUppercase(simpleName)) {
141-
return simpleName.toLowerCase();
141+
return simpleName.toLowerCase(Locale.ROOT);
142142
}
143143

144144
// Decapitalize

0 commit comments

Comments
 (0)