1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 09:08:49 -05:00

Cleaned up readTokens()

This commit is contained in:
cketti 2011-11-16 03:10:26 +01:00
parent 688db057ac
commit 727c8564ec

View File

@ -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);