Remove Constants.SYSTEM_CHARSET

This commit is contained in:
yushijinhun 2018-09-22 12:54:15 +08:00
parent e7c2170ce3
commit fa38c53915
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
2 changed files with 2 additions and 7 deletions

View File

@ -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()) {

View File

@ -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/";