Skip to content

Commit

Permalink
Update JvmDowngrader
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Nov 12, 2024
1 parent b099e27 commit b1e7bda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id("io.github.gaming32.gradle.preprocess-root") version "0.4.4"
id("dev.architectury.loom") version "1.7.414" apply false
id("com.modrinth.minotaur") version "2.8.7" apply false
id("xyz.wagyourtail.jvmdowngrader") version "1.1.2" apply false
id("xyz.wagyourtail.jvmdowngrader") version "1.2.1" apply false
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,10 @@ private static Map<String, Map<String, String>> parseZoneIdentifier(ByteBuffer b
try (var reader = new BufferedReader(
new InputStreamReader(
new ByteArrayInputStream(bb.array(), bb.arrayOffset() + bb.position(), bb.remaining()),
getWindowsCharset()
Charset.forName(System.getProperty("native.encoding"))
)
)) {
return SimpleIniParser.parse(reader);
}
}

// TODO: Replace with direct native.encoding usage when Java 18+ becomes the minimum
private static Charset getWindowsCharset() {
final var nativeCharset = System.getProperty("native.encoding");
return nativeCharset == null ? Charset.defaultCharset() : Charset.forName(nativeCharset);
}
}

0 comments on commit b1e7bda

Please sign in to comment.