Author: norman
Date: Sat Jul 16 07:14:34 2011
New Revision: 1147368
URL: http://svn.apache.org/viewvc?rev=1147368&view=rev
Log:
Fix CONDSTORE option parsing which I broke while working on QRESYNC. See
IMAP-307
Modified:
james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java
Modified:
james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java
URL:
http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java?rev=1147368&r1=1147367&r2=1147368&view=diff
==============================================================================
---
james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java
(original)
+++
james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java
Sat Jul 16 07:14:34 2011
@@ -74,18 +74,12 @@ public abstract class AbstractSelectionC
switch (n) {
case 'C':
// It starts with C so it should be CONDSTORE
- request.consumeWord(new CharacterValidator() {
- int pos = 0;
-
- @Override
- public boolean isValid(char chr) {
- if (pos >= CONDSTORE.length) {
- return false;
- } else {
- return ImapRequestLineReader.cap(chr) ==
CONDSTORE[pos++];
- }
+ int pos = 0;
+ while (pos < CONDSTORE.length) {
+ if (CONDSTORE[pos++] !=
ImapRequestLineReader.cap(request.consume())) {
+ throw new
DecodingException(HumanReadableText.ILLEGAL_ARGUMENTS, "Unknown option");
}
- });
+ }
condstore = true;
break;
case 'Q':
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]