removed unused import, add log

This commit is contained in:
Sandro La Bruzzo 2021-04-27 12:17:23 +02:00
parent 74484d2823
commit 63c0303137
2 changed files with 24 additions and 23 deletions

View File

@ -175,6 +175,10 @@ object ImportDatacite {
println("Error", e) println("Error", e)
} finally if (writer != null) writer.close() } finally if (writer != null) writer.close()
} }
catch {
case e: Throwable =>
log.error("Error", e)
}
i i
} }

View File

@ -1,26 +1,9 @@
package eu.dnetlib.dhp.collection.plugin.rest; package eu.dnetlib.dhp.collection.plugin.rest;
import java.io.InputStream; import eu.dnetlib.dhp.collection.CollectorException;
import java.io.StringWriter; import eu.dnetlib.dhp.collection.HttpClientParams;
import java.io.UnsupportedEncodingException; import eu.dnetlib.dhp.collection.JsonUtils;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.Queue;
import java.util.concurrent.PriorityBlockingQueue;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.*;
import org.apache.avro.test.http.Http;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpHeaders; import org.apache.http.HttpHeaders;
@ -31,9 +14,23 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
import eu.dnetlib.dhp.collection.CollectorException; import javax.xml.transform.OutputKeys;
import eu.dnetlib.dhp.collection.HttpClientParams; import javax.xml.transform.Transformer;
import eu.dnetlib.dhp.collection.JsonUtils; import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.*;
import java.io.InputStream;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.Queue;
import java.util.concurrent.PriorityBlockingQueue;
/** /**
* log.info(...) equal to log.trace(...) in the application-logs * log.info(...) equal to log.trace(...) in the application-logs