mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 00:58:50 -05:00
Cleaned up readTokens()
This commit is contained in:
parent
688db057ac
commit
727c8564ec
@ -68,16 +68,14 @@ public class ImapResponseParser {
|
||||
|
||||
private void readTokens(ImapResponse response) throws IOException {
|
||||
response.clear();
|
||||
Object token;
|
||||
|
||||
String firstToken = (String) readToken(response);
|
||||
|
||||
response.add(firstToken);
|
||||
|
||||
skipIfSpace();
|
||||
|
||||
if (isStatusResponse(firstToken)) {
|
||||
parseStatusResponse(response);
|
||||
} else {
|
||||
Object token;
|
||||
while ((token = readToken(response)) != null) {
|
||||
if (!(token instanceof ImapList)) {
|
||||
response.add(token);
|
||||
@ -92,6 +90,8 @@ public class ImapResponseParser {
|
||||
|
||||
void parseStatusResponse(ImapResponse parent) throws IOException {
|
||||
|
||||
skipIfSpace();
|
||||
|
||||
int next = mIn.peek();
|
||||
if (next == '[') {
|
||||
parseSequence(parent);
|
||||
|
Loading…
Reference in New Issue
Block a user