chore: update build.gradle

upgrade io.netty:netty-tcnative-boringssl-static from 2.0.41.Final to 2.0.46.Final; rename CMDConf.parseConf to CMDConf.parseFile
This commit is contained in:
Frank.R.Wu 2021-12-23 21:39:05 +08:00
parent 68062f1498
commit eb69c62092
3 changed files with 4 additions and 6 deletions

View File

@ -23,7 +23,7 @@ sourceSets {
}
dependencies {
api project (":common")
api 'io.netty:netty-tcnative-boringssl-static:2.0.41.Final'
api 'io.netty:netty-tcnative-boringssl-static:2.0.46.Final'
api 'com.google.code.gson:gson:2.8.8'
testImplementation 'junit:junit:4.13.2'

View File

@ -1,6 +1,5 @@
package org.bdware.server;
import com.google.gson.Gson;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bdware.sc.util.JsonUtil;
@ -39,7 +38,7 @@ public class CMDConf {
public String clientToClusterPlugins = "";
public String tcpPlugins = "";
public static CMDConf parseConf(String confPath) {
public static CMDConf parseFile(String confPath) {
CMDConf ret = null;
File conf = new File(confPath);
if (conf.exists()) {
@ -49,7 +48,7 @@ public class CMDConf {
while (null != (temp = br.readLine())) {
sbl.append(temp);
}
ret = new Gson().fromJson(sbl.toString(), CMDConf.class);
ret = JsonUtil.fromJson(sbl.toString(), CMDConf.class);
} catch (IOException ignored) {
LOGGER.warn("parsing configure from file failed!");
}

View File

@ -15,9 +15,8 @@ import java.io.RandomAccessFile;
import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
public class HttpFileHandleAdapter extends SimpleChannelInboundHandler<FullHttpRequest> {
FileFilter fileFilter;
private final String location;
FileFilter fileFilter;
public HttpFileHandleAdapter(String path, FileFilter fileFilter) {
location = path;