started another importer overhaul
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -14,6 +14,6 @@ dependencies {
|
||||
implementation("de.srsoftware:tools.logging:1.0.3")
|
||||
implementation("de.srsoftware:tools.plugin:1.0.1")
|
||||
implementation("de.srsoftware:tools.util:1.3.0")
|
||||
implementation("de.srsoftware:tools.web:1.3.9")
|
||||
implementation("de.srsoftware:tools.web:1.3.10")
|
||||
implementation("com.mysql:mysql-connector-j:9.1.0")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import de.srsoftware.cal.api.Importer;
|
||||
import de.srsoftware.cal.db.Database;
|
||||
import de.srsoftware.tools.plugin.ClassListener;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.time.Duration;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
@@ -282,10 +281,10 @@ public class AutoImporter implements Runnable, ClassListener {
|
||||
if (Importer.class.isAssignableFrom(aClass)) try {
|
||||
var instance = aClass.getDeclaredConstructor().newInstance();
|
||||
importers.add((Importer) instance);
|
||||
LOG.log(INFO,"Added {0} to the list of importers. Will be used soon…",instance);
|
||||
lastImport = null;
|
||||
} catch (InvocationTargetException | InstantiationException | IllegalAccessException | NoSuchMethodException e) {
|
||||
throw new RuntimeException(e);
|
||||
LOG.log(INFO,"Added {0} to the list of importers. Will be used soon…",instance);
|
||||
} catch (Exception e) {
|
||||
LOG.log(WARNING,"Failed to add importer: {0}",aClass.getSimpleName(),e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user