From 9a9c7bf71960c62f1f4f5c99e51d2ef54cba145f Mon Sep 17 00:00:00 2001 From: Jan Keim Date: Mon, 28 Aug 2023 15:08:21 +0200 Subject: [PATCH] Format --- pom.xml | 10 +++++----- stages/text-preprocessing/pom.xml | 8 ++++---- .../corenlp/textprocessor/HttpCommunicator.java | 6 ++---- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 355a17c17..f6d7ec73c 100644 --- a/pom.xml +++ b/pom.xml @@ -141,6 +141,11 @@ commons-io 2.13.0 + + io.github.ardoco + text-provider-json + 0.8.0 + @@ -170,11 +175,6 @@ eclipse-collections ${eclipse-collections.version} - - io.github.ardoco - text-provider-json - 0.8.0 - diff --git a/stages/text-preprocessing/pom.xml b/stages/text-preprocessing/pom.xml index 4d5bd50c0..badcfd41e 100644 --- a/stages/text-preprocessing/pom.xml +++ b/stages/text-preprocessing/pom.xml @@ -46,6 +46,10 @@ common ${revision} + + org.apache.httpcomponents.client5 + httpclient5 + org.junit.jupiter junit-jupiter-params @@ -60,9 +64,5 @@ slf4j-simple test - - org.apache.httpcomponents.client5 - httpclient5 - diff --git a/stages/text-preprocessing/src/main/java/edu/kit/kastel/mcse/ardoco/core/text/providers/informants/corenlp/textprocessor/HttpCommunicator.java b/stages/text-preprocessing/src/main/java/edu/kit/kastel/mcse/ardoco/core/text/providers/informants/corenlp/textprocessor/HttpCommunicator.java index d2b248a6e..4aa468dac 100644 --- a/stages/text-preprocessing/src/main/java/edu/kit/kastel/mcse/ardoco/core/text/providers/informants/corenlp/textprocessor/HttpCommunicator.java +++ b/stages/text-preprocessing/src/main/java/edu/kit/kastel/mcse/ardoco/core/text/providers/informants/corenlp/textprocessor/HttpCommunicator.java @@ -1,3 +1,4 @@ +/* Licensed under MIT 2023. */ package edu.kit.kastel.mcse.ardoco.core.text.providers.informants.corenlp.textprocessor; import java.io.IOException; @@ -12,7 +13,6 @@ public class HttpCommunicator { - public String sendAuthenticatedGetRequest(String requestUrl) throws IOException { String username = System.getenv("USERNAME"); String password = System.getenv("PASSWORD"); @@ -22,9 +22,7 @@ public String sendAuthenticatedGetRequest(String requestUrl) throws IOException HttpGet request = new HttpGet(requestUrl); BasicCredentialsProvider provider = new BasicCredentialsProvider(); - provider.setCredentials( - new AuthScope(null, -1), - new UsernamePasswordCredentials(username, password.toCharArray())); + provider.setCredentials(new AuthScope(null, -1), new UsernamePasswordCredentials(username, password.toCharArray())); try (CloseableHttpClient httpClient = HttpClients.custom().setDefaultCredentialsProvider(provider).build()) { return httpClient.execute(request, new BasicHttpClientResponseHandler()); }