Skip to content

Commit 7f217bf

Browse files
committed
Remove (merely) usage of Commons Lang3
1 parent b5392c6 commit 7f217bf

File tree

4 files changed

+1
-9
lines changed

4 files changed

+1
-9
lines changed

NOTICE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Licensed under Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.html
99
This software includes third party software subject to the following licenses:
1010

1111
Apache Commons Codec under Apache License, Version 2.0
12-
Apache Commons Lang under Apache License, Version 2.0
1312
Apache HttpClient under Apache License, Version 2.0
1413
Apache HttpComponents Core HTTP/1.1 under Apache License, Version 2.0
1514
Apache HttpComponents Core HTTP/2 under Apache License, Version 2.0

lib/NOTICE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Licensed under Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.html
99
This software includes third party software subject to the following licenses:
1010

1111
Apache Commons Codec under Apache License, Version 2.0
12-
Apache Commons Lang under Apache License, Version 2.0
1312
Apache HttpClient under Apache License, Version 2.0
1413
Apache HttpComponents Core HTTP/1.1 under Apache License, Version 2.0
1514
Apache HttpComponents Core HTTP/2 under Apache License, Version 2.0

lib/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@
8686
<artifactId>commons-codec</artifactId>
8787
<version>1.15</version>
8888
</dependency>
89-
<dependency>
90-
<groupId>org.apache.commons</groupId>
91-
<artifactId>commons-lang3</artifactId>
92-
<version>3.12.0</version>
93-
</dependency>
9489

9590
<dependency>
9691
<groupId>org.slf4j</groupId>

lib/src/main/java/no/digipost/signature/client/core/internal/ClientExceptionMapper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import no.digipost.signature.client.core.internal.http.ResponseStatus;
88
import no.digipost.signature.client.core.internal.http.StatusCode;
99
import no.digipost.signature.client.core.internal.xml.Marshalling;
10-
import org.apache.commons.lang3.StringUtils;
1110
import org.apache.hc.core5.http.ClassicHttpResponse;
1211
import org.apache.hc.core5.http.ContentType;
1312
import org.apache.hc.core5.http.HttpHeaders;
@@ -63,7 +62,7 @@ static XMLError extractError(ClassicHttpResponse response) {
6362
}
6463
throw new UnexpectedResponseException(
6564
HttpHeaders.CONTENT_TYPE + " " + contentType.map(ContentType::getMimeType).orElse("unknown") + ": " +
66-
Optional.ofNullable(errorAsString).filter(StringUtils::isNoneBlank).orElse("<no content in response>"),
65+
Optional.ofNullable(errorAsString).filter(s -> !s.trim().isEmpty()).orElse("<no content in response>"),
6766
ResponseStatus.fromHttpResponse(response).get(), StatusCode.OK);
6867
}
6968
return error;

0 commit comments

Comments
 (0)