Skip to content

Commit

Permalink
replaced apache commons base64 encoder/decoder with native java (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbevard1 authored and billoley committed May 16, 2024
1 parent 03e993f commit f583c62
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.nio.charset.Charset;
import java.util.Arrays;
import java.util.Base64;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
Expand All @@ -15,7 +16,6 @@
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Positive;

import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang.StringUtils;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;
Expand Down Expand Up @@ -165,7 +165,7 @@ public Map<String,String> getProperties() {
p.put("AccumuloRecordWriter.instanceName", instanceName);
p.put("AccumuloRecordWriter.username", username);
// encode the password because that's how the AccumuloRecordWriter expects it
byte[] encodedPassword = Base64.encodeBase64(password.getBytes(Charset.forName("UTF-8")));
byte[] encodedPassword = Base64.getEncoder().encode(password.getBytes(Charset.forName("UTF-8")));
p.put("AccumuloRecordWriter.password", new String(encodedPassword, Charset.forName("UTF-8")));
p.put("AccumuloRecordWriter.createtables", Boolean.toString(createTables));
p.put(shardTableName + ".table.config.class", ShardTableConfigHelper.class.getCanonicalName());
Expand Down

0 comments on commit f583c62

Please sign in to comment.