Reamer commented on code in PR #4891:
URL: https://github.com/apache/zeppelin/pull/4891#discussion_r1855430179


##########
zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java:
##########
@@ -1553,4 +1554,21 @@ private <T> boolean checkPermission(String noteId,
       return false;
     }
   }
+
+  private String decodeRepeatedly(final String encoded) throws IOException {

Review Comment:
   This method can be static.
   ```suggestion
     private static String decodeRepeatedly(final String encoded) throws 
IOException {
   ```



##########
zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java:
##########
@@ -1553,4 +1554,21 @@ private <T> boolean checkPermission(String noteId,
       return false;
     }
   }
+
+  private String decodeRepeatedly(final String encoded) throws IOException {
+    String previous = encoded;
+    int maxDecodeAttempts = 5;
+    int attempts = 0;
+
+    while (attempts < maxDecodeAttempts) {
+      String decoded = URLDecoder.decode(previous, 
StandardCharsets.UTF_8.toString());

Review Comment:
   ```suggestion
         String decoded = URLDecoder.decode(previous, StandardCharsets.UTF_8);
   ```
   After 
https://github.com/apache/zeppelin/commit/414f4d1c470b5046628cfc378e6602fb78240e8f,
 we can now use JDK 11 functions.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to