started another importer overhaul
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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