You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/05/04 11:02:19 UTC

[GitHub] [james-project] chibenwa commented on a diff in pull request #980: JAMES-1489 Fix decoding for complex UTF-8 searches

chibenwa commented on code in PR #980:
URL: https://github.com/apache/james-project/pull/980#discussion_r864705859


##########
protocols/imap/src/main/java/org/apache/james/imap/decode/parser/SearchCommandParser.java:
##########
@@ -49,6 +50,18 @@
  * Parse SEARCH commands
  */
 public class SearchCommandParser extends AbstractUidCommandParser {
+    private static class Context {
+        private Optional<Charset> previousCharset = Optional.empty();
+
+        public void setCharset(Charset charset) {
+            previousCharset = Optional.of(charset);
+        }
+
+        public Charset getCharset() {
+            return previousCharset.orElse(null);
+        }
+    }

Review Comment:
   A: because I wanted to minimize the changes in this complex call, it would have had required to change 20+ method signature.
   
   



-- 
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: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org