This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new a16f45811ec HBASE-28628 Use Base64.getUrlEncoder().withoutPadding() in 
REST tests (#5952)
a16f45811ec is described below

commit a16f45811ec54ce3ede229579177151675781862
Author: Istvan Toth <st...@apache.org>
AuthorDate: Thu May 30 19:23:36 2024 +0200

    HBASE-28628 Use Base64.getUrlEncoder().withoutPadding() in REST tests 
(#5952)
    
    Signed-off-by: Ankit Singhal <an...@apache.org>
---
 .../src/test/java/org/apache/hadoop/hbase/rest/RowResourceBase.java   | 4 ++--
 .../test/java/org/apache/hadoop/hbase/rest/TestGetAndPutResource.java | 4 ++--
 .../test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java  | 4 ++--
 .../src/test/java/org/apache/hadoop/hbase/rest/TestTableScan.java     | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/RowResourceBase.java 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/RowResourceBase.java
index 6373c8515e0..004458d99e6 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/RowResourceBase.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/RowResourceBase.java
@@ -498,7 +498,7 @@ public class RowResourceBase {
   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('/');
@@ -543,7 +543,7 @@ public class RowResourceBase {
   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('/');
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestGetAndPutResource.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestGetAndPutResource.java
index d14c45e0532..b20baea9df8 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestGetAndPutResource.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestGetAndPutResource.java
@@ -367,7 +367,7 @@ public class TestGetAndPutResource extends RowResourceBase {
     setupValue1();
 
     StringBuilder path = new StringBuilder();
-    Base64.Encoder encoder = Base64.getUrlEncoder();
+    Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();
     path.append('/');
     path.append(TABLE);
     path.append('/');
@@ -387,7 +387,7 @@ public class TestGetAndPutResource extends RowResourceBase {
     setupValue1();
 
     StringBuilder path = new StringBuilder();
-    Base64.Encoder encoder = Base64.getUrlEncoder();
+    Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();
     path.append('/');
     path.append(TABLE);
     path.append('/');
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
index e4371dbcc2d..bfe5846e071 100644
--- 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
+++ 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
@@ -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;
@@ -191,7 +191,7 @@ public class TestMultiRowResource {
     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=");
diff --git 
a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestTableScan.java 
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestTableScan.java
index 8f0e83c07e9..2833e9d8dee 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestTableScan.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestTableScan.java
@@ -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();

Reply via email to