Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-28628 Use Base64.getUrlEncoder().withoutPadding() in REST tests #5952

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,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 @@ -543,7 +543,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 @@ -77,7 +77,7 @@ public class TestMultiRowResource {
private static final HBaseTestingUtil TEST_UTIL = new HBaseTestingUtil();
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 @@ -191,7 +191,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 @@ -95,7 +95,7 @@ public class TestTableScan {
private static int expectedRows3;
private static Configuration conf;

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

private static final HBaseTestingUtil TEST_UTIL = new HBaseTestingUtil();
private static final HBaseRESTTestingUtility REST_TEST_UTIL = new HBaseRESTTestingUtility();
Expand Down