mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-03-07 17:36:52 +08:00
Remove Constants.SYSTEM_CHARSET
This commit is contained in:
parent
e7c2170ce3
commit
fa38c53915
@ -17,13 +17,13 @@
|
||||
*/
|
||||
package org.jackhuang.hmcl.launch;
|
||||
|
||||
import org.jackhuang.hmcl.util.Constants;
|
||||
import org.jackhuang.hmcl.util.Logging;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
|
||||
@ -49,7 +49,7 @@ final class StreamPump implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, Constants.SYSTEM_CHARSET))) {
|
||||
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, Charset.defaultCharset()))) {
|
||||
String line;
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
|
@ -18,10 +18,7 @@
|
||||
package org.jackhuang.hmcl.util;
|
||||
|
||||
import org.jackhuang.hmcl.task.Schedulers;
|
||||
import org.jackhuang.hmcl.util.platform.OperatingSystem;
|
||||
|
||||
import java.awt.*;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
@ -34,8 +31,6 @@ public final class Constants {
|
||||
private Constants() {
|
||||
}
|
||||
|
||||
public static final Charset SYSTEM_CHARSET = Charset.forName(OperatingSystem.ENCODING);
|
||||
|
||||
public static final String DEFAULT_LIBRARY_URL = "https://libraries.minecraft.net/";
|
||||
public static final String DEFAULT_VERSION_DOWNLOAD_URL = "https://s3.amazonaws.com/Minecraft.Download/versions/";
|
||||
public static final String DEFAULT_INDEX_URL = "https://s3.amazonaws.com/Minecraft.Download/indexes/";
|
||||
|
Loading…
Reference in New Issue
Block a user