Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Gram21 committed Aug 28, 2023
1 parent 01c399d commit 9a9c7bf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@
<artifactId>commons-io</artifactId>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>io.github.ardoco</groupId>
<artifactId>text-provider-json</artifactId>
<version>0.8.0</version>
</dependency>

<!-- Commons -->
<dependency>
Expand Down Expand Up @@ -170,11 +175,6 @@
<artifactId>eclipse-collections</artifactId>
<version>${eclipse-collections.version}</version>
</dependency>
<dependency>
<groupId>io.github.ardoco</groupId>
<artifactId>text-provider-json</artifactId>
<version>0.8.0</version>
</dependency>

<!-- Eclipse collections -->
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions stages/text-preprocessing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
<artifactId>common</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
Expand All @@ -60,9 +64,5 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* Licensed under MIT 2023. */
package edu.kit.kastel.mcse.ardoco.core.text.providers.informants.corenlp.textprocessor;

import java.io.IOException;
Expand All @@ -12,7 +13,6 @@

public class HttpCommunicator {


public String sendAuthenticatedGetRequest(String requestUrl) throws IOException {
String username = System.getenv("USERNAME");
String password = System.getenv("PASSWORD");
Expand All @@ -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());
}
Expand Down

0 comments on commit 9a9c7bf

Please sign in to comment.