Skip to content

Commit

Permalink
HBASE-28628 Use Base64.getUrlEncoder().withoutPadding() in REST tests (
Browse files Browse the repository at this point in the history
…#5952)

Signed-off-by: Ankit Singhal <[email protected]>
(cherry picked from commit a16f458)
  • Loading branch information
stoty committed May 30, 2024
1 parent 0a3f64e commit 089e976
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ protected static Response deleteValue(String table, String row, String column)
protected static Response deleteValueB64(String table, String row, String column,
boolean useQueryString) throws IOException {
StringBuilder path = new StringBuilder();
Base64.Encoder encoder = Base64.getUrlEncoder();
Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();
path.append('/');
path.append(table);
path.append('/');
Expand Down Expand Up @@ -538,7 +538,7 @@ protected static Response deleteRow(String table, String row) throws IOException
protected static Response deleteRowB64(String table, String row, boolean useQueryString)
throws IOException {
StringBuilder path = new StringBuilder();
Base64.Encoder encoder = Base64.getUrlEncoder();
Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();
path.append('/');
path.append(table);
path.append('/');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public void testUrlB64EncodedKeyQueryParam() throws IOException, JAXBException {
setupValue1();

StringBuilder path = new StringBuilder();
Base64.Encoder encoder = Base64.getUrlEncoder();
Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();
path.append('/');
path.append(TABLE);
path.append('/');
Expand All @@ -387,7 +387,7 @@ public void testUrlB64EncodedKeyHeader() throws IOException, JAXBException {
setupValue1();

StringBuilder path = new StringBuilder();
Base64.Encoder encoder = Base64.getUrlEncoder();
Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();
path.append('/');
path.append(TABLE);
path.append('/');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class TestMultiRowResource {
private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static final HBaseRESTTestingUtility REST_TEST_UTIL = new HBaseRESTTestingUtility();

private static final Encoder base64UrlEncoder = java.util.Base64.getUrlEncoder();
private static final Encoder base64UrlEncoder = java.util.Base64.getUrlEncoder().withoutPadding();

private static Client client;
private static Configuration conf;
Expand Down Expand Up @@ -187,7 +187,7 @@ public void testMultiCellGetJSONB64() throws IOException {
client.post(row_6_url, Constants.MIMETYPE_BINARY, Bytes.toBytes(VALUE_2), extraHdr);

StringBuilder path = new StringBuilder();
Base64.Encoder encoder = Base64.getUrlEncoder();
Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();
path.append("/");
path.append(TABLE);
path.append("/multiget/?row=");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public class TestTableScan {
private static Configuration conf;

private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static final Encoder base64UrlEncoder = java.util.Base64.getUrlEncoder();
private static final Encoder base64UrlEncoder = java.util.Base64.getUrlEncoder().withoutPadding();
private static final HBaseRESTTestingUtility REST_TEST_UTIL = new HBaseRESTTestingUtility();

@BeforeClass
Expand Down

0 comments on commit 089e976

Please sign in to comment.