mirror of
https://gitee.com/BDWare/agent-backend
synced 2025-04-29 07:32:16 +00:00
fix: plugin null bugs
This commit is contained in:
parent
e1e0435589
commit
e706180493
@ -53,6 +53,7 @@ public class CMHttpServer {
|
|||||||
private static SslContext sslContext = null;
|
private static SslContext sslContext = null;
|
||||||
final String PATH = "/SCIDE/SCExecutor";
|
final String PATH = "/SCIDE/SCExecutor";
|
||||||
private final int port;
|
private final int port;
|
||||||
|
|
||||||
private static void parseConf(CMDConf cmdConf) throws IOException {
|
private static void parseConf(CMDConf cmdConf) throws IOException {
|
||||||
if (cmdConf.disableDoRepo) {
|
if (cmdConf.disableDoRepo) {
|
||||||
DoConfig.callContractUsingDOI = false;
|
DoConfig.callContractUsingDOI = false;
|
||||||
@ -244,6 +245,7 @@ public class CMHttpServer {
|
|||||||
return pathname.getName().endsWith(".jar");
|
return pathname.getName().endsWith(".jar");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (pluginJar != null && pluginJar.length > 0) {
|
||||||
URL[] urls = new URL[pluginJar.length];
|
URL[] urls = new URL[pluginJar.length];
|
||||||
for (int i = 0; i < pluginJar.length; i++) {
|
for (int i = 0; i < pluginJar.length; i++) {
|
||||||
try {
|
try {
|
||||||
@ -254,6 +256,9 @@ public class CMHttpServer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pluginLoader = new URLClassLoader(urls, CMHttpServer.class.getClassLoader());
|
pluginLoader = new URLClassLoader(urls, CMHttpServer.class.getClassLoader());
|
||||||
|
} else {
|
||||||
|
pluginLoader = new URLClassLoader(new URL[]{}, CMHttpServer.class.getClassLoader());
|
||||||
|
}
|
||||||
if (port >= 18000 && port < 18100) {
|
if (port >= 18000 && port < 18100) {
|
||||||
ContractManager.cPort = new ContractPort(1615 + (port - 18000) * 30);
|
ContractManager.cPort = new ContractPort(1615 + (port - 18000) * 30);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user