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/03 08:38:24 UTC
[GitHub] [james-project] chibenwa opened a new pull request, #980: JAMES-1489 Fix decoding for complex UTF-8 searches
chibenwa opened a new pull request, #980:
URL: https://github.com/apache/james-project/pull/980
- Reader index was not properly reset for
multiple subsequent continuations.
- Charset was not carried over for all the
terms of the search.
--
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
[GitHub] [james-project] chibenwa commented on a diff in pull request #980: JAMES-1489 Fix decoding for complex UTF-8 searches
Posted by GitBox <gi...@apache.org>.
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
[GitHub] [james-project] chibenwa merged pull request #980: JAMES-1489 Fix decoding for complex UTF-8 searches
Posted by GitBox <gi...@apache.org>.
chibenwa merged PR #980:
URL: https://github.com/apache/james-project/pull/980
--
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
[GitHub] [james-project] quantranhong1999 commented on a diff in pull request #980: JAMES-1489 Fix decoding for complex UTF-8 searches
Posted by GitBox <gi...@apache.org>.
quantranhong1999 commented on code in PR #980:
URL: https://github.com/apache/james-project/pull/980#discussion_r864552221
##########
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:
Q: Why do we use Optional when directly returning null?
--
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
[GitHub] [james-project] Arsnael commented on pull request #980: JAMES-1489 Fix decoding for complex UTF-8 searches
Posted by GitBox <gi...@apache.org>.
Arsnael commented on PR #980:
URL: https://github.com/apache/james-project/pull/980#issuecomment-1116887255
Hmm lots of null pointer exceptions in tests... like this one:
```
org.apache.james.imap.decode.parser.SearchCommandParserCharsetTest.testASCIICharset
java.lang.NullPointerException
at org.apache.james.imap.decode.parser.SearchCommandParserCharsetTest.checkValid(SearchCommandParserCharsetTest.java:169)
at org.apache.james.imap.decode.parser.SearchCommandParserCharsetTest.testASCIICharset(SearchCommandParserCharsetTest.java:142)
```
--
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
[GitHub] [james-project] chibenwa commented on pull request #980: JAMES-1489 Fix decoding for complex UTF-8 searches
Posted by GitBox <gi...@apache.org>.
chibenwa commented on PR #980:
URL: https://github.com/apache/james-project/pull/980#issuecomment-1116896547
Yes, tests with mocks!
--
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