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



##########
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:
       Why not roll this functionality into the 2-argiment `filter` method? 
Having another method with the same name that works _sort of_ but not _exactly 
like_ `filter(*, false)` is honestly a little confusing.
   




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