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