aboutsummaryrefslogtreecommitdiffstats
path: root/workflow-designer-be/src/main
diff options
context:
space:
mode:
authorTomasz Golabek <tomasz.golabek@nokia.com>2019-08-28 12:21:27 +0200
committerTomasz Golabek <tomasz.golabek@nokia.com>2019-08-28 12:21:27 +0200
commit61ccc9e58b55d96330892231047a239dadf409a0 (patch)
tree4233ebc53194851b1259c84b1f865faa73874ed7 /workflow-designer-be/src/main
parent82acc47d6afad5f6d27f5bf6e927249be9da0a5a (diff)
commons-codec removed
Change-Id: Id2b6e0f65f15bed115b9c30ec2b51f9ed3ab0532 Issue-ID: SDC-2504 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
Diffstat (limited to 'workflow-designer-be/src/main')
-rw-r--r--workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/ArtifactAssociationService.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/ArtifactAssociationService.java b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/ArtifactAssociationService.java
index a837d700..621d1803 100644
--- a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/ArtifactAssociationService.java
+++ b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/api/ArtifactAssociationService.java
@@ -22,10 +22,10 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.ArrayList;
+import java.util.Base64;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
-import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.IOUtils;
import org.onap.sdc.workflow.api.types.dto.ArtifactDeliveriesRequestDto;
import org.onap.sdc.workflow.persistence.types.ArtifactEntity;
@@ -127,7 +127,7 @@ public class ArtifactAssociationService {
private String getFormattedWorkflowArtifact(ArtifactEntity artifactEntity) throws IOException {
- byte[] encodeBase64 = Base64.encodeBase64(IOUtils.toByteArray(artifactEntity.getArtifactData()));
+ byte[] encodeBase64 = Base64.getEncoder().encode(IOUtils.toByteArray(artifactEntity.getArtifactData()));
String encodedPayloadData = new String(encodeBase64);
Map<String, String> artifactInfo = new HashMap<>();
@@ -153,13 +153,13 @@ public class ArtifactAssociationService {
private String calculateMD5Base64EncodedByString(String data) {
String calculatedMd5 = md5Hex(data);
// encode base-64 result
- byte[] encodeBase64 = Base64.encodeBase64(calculatedMd5.getBytes());
+ byte[] encodeBase64 = Base64.getEncoder().encode(calculatedMd5.getBytes());
return new String(encodeBase64);
}
private String createAuthorizationsHeaderValue(String username, String password) {
String auth = username + ":" + password;
- byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(Charset.forName("US-ASCII")));
+ byte[] encodedAuth = Base64.getEncoder().encode(auth.getBytes(Charset.forName("US-ASCII")));
return "Basic " + new String(encodedAuth);
}
} \ No newline at end of file