mike-jumper commented on a change in pull request #689:
URL: https://github.com/apache/guacamole-client/pull/689#discussion_r792309058



##########
File path: 
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenFilter.java
##########
@@ -247,19 +269,71 @@ public String filter(String input) {
 
             // Update last regex match
             endOfLastMatch = tokenMatcher.end();
-            
+
         }
 
         // Append any remaining non-token text
         output.append(input.substring(endOfLastMatch));
-        
+
         return output.toString();
-       
+
+    }
+
+    /**
+     * Filters the given string, replacing any tokens with their corresponding
+     * values. Any tokens present in the given string which lack values will
+     * be interpreted as literals.
+     *
+     * @param input
+     *     The string to filter.
+     *
+     * @return
+     *     A copy of the input string, with any tokens replaced with their
+     *     corresponding values.
+     */
+    public String filter(String input) {

Review comment:
       Ah - because that would require all callers of `filter()` to handle the 
possible exception, even when there will not be one in the `false` case. There 
was some discussion on this in #336 (look for resolved conversations regarding 
`TokenFilter.java - linking to the conversation directly appears to not work 
for resolved discussions 🤷).




-- 
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