package de.idrinth.waraddonclient;

import de.idrinth.waraddonclient.service.Config;
import de.idrinth.waraddonclient.model.TrustManager;
import de.idrinth.waraddonclient.service.BaseLogger;
import de.idrinth.waraddonclient.service.FileLogger;
import de.idrinth.waraddonclient.service.FileSystem;
import de.idrinth.waraddonclient.service.MultiLogger;
import de.idrinth.waraddonclient.service.Request;
import java.io.IOException;
import java.net.URISyntaxException;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import javax.xml.parsers.ParserConfigurationException;

abstract class BaseMain {
    private final MultiLogger logger = new MultiLogger();

    protected final void add(BaseLogger baseLogger) {
        logger.add(baseLogger);
    }

    protected abstract void main(MultiLogger logger, Config config, Request client, FileSystem file) throws FileSystem.FileSystemException, ParserConfigurationException, IOException;

    public void run() {
        try {
            Config config = new Config();
            add(new FileLogger(config.getLogFile()));
            Request client = new Request(new TrustManager(logger), logger, config);
            FileSystem file = new FileSystem(config);
            this.main(logger, config, client, file);
        } catch (ParserConfigurationException|FileSystem.FileSystemException|IOException|CertificateException|KeyManagementException|KeyStoreException|NoSuchAlgorithmException|URISyntaxException ex) {
            logger.error(ex);
        }
    }
}

@@ -764,25 +764,30 @@
 MultiLogger 
-l
+multiL
 ogger = new 
@@ -863,25 +863,30 @@
  %7B%0D%0A        
-l
+multiL
 ogger.add(ba
@@ -1292,17 +1292,22 @@
 ger(
-l
+multiL
 ogger), 
 logg
@@ -1302,17 +1302,22 @@
 ogger), 
-l
+multiL
 ogger, c
@@ -1402,17 +1402,22 @@
 is.main(
-l
+multiL
 ogger, c
@@ -1653,17 +1653,22 @@
         
-l
+multiL
 ogger.er

fix last codacy complaint