fix bugs
This commit is contained in:
@@ -40,14 +40,16 @@ class ASysCore implements ICore {
|
|||||||
|
|
||||||
File libsDir = new File(directory);
|
File libsDir = new File(directory);
|
||||||
String[] jarsList = libsDir.list();
|
String[] jarsList = libsDir.list();
|
||||||
for (String jar : jarsList) {
|
if (jarsList != null) {
|
||||||
if (!jar.endsWith(".jar")) continue;
|
for (String jar : jarsList) {
|
||||||
try {
|
if (!jar.endsWith(".jar")) continue;
|
||||||
logger.trace("Load jar \"{}/{}\"", directory, jar);
|
try {
|
||||||
Bundle bundle = bundleContext.installBundle(String.format("file:%s/%s", directory, jar));
|
logger.trace("Load jar \"{}/{}\"", directory, jar);
|
||||||
bundlesList.add(bundle);
|
Bundle bundle = bundleContext.installBundle(String.format("file:%s/%s", directory, jar));
|
||||||
} catch (BundleException e) {
|
bundlesList.add(bundle);
|
||||||
logger.error(String.format("Error load jar \"%s/%s\"", directory, jar), e);
|
} catch (BundleException e) {
|
||||||
|
logger.error(String.format("Error load jar \"%s/%s\"", directory, jar), e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user