mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-26 01:28: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 {
|
private void readTokens(ImapResponse response) throws IOException {
|
||||||
response.clear();
|
response.clear();
|
||||||
Object token;
|
|
||||||
String firstToken = (String) readToken(response);
|
String firstToken = (String) readToken(response);
|
||||||
|
|
||||||
response.add(firstToken);
|
response.add(firstToken);
|
||||||
|
|
||||||
skipIfSpace();
|
|
||||||
|
|
||||||
if (isStatusResponse(firstToken)) {
|
if (isStatusResponse(firstToken)) {
|
||||||
parseStatusResponse(response);
|
parseStatusResponse(response);
|
||||||
} else {
|
} else {
|
||||||
|
Object token;
|
||||||
while ((token = readToken(response)) != null) {
|
while ((token = readToken(response)) != null) {
|
||||||
if (!(token instanceof ImapList)) {
|
if (!(token instanceof ImapList)) {
|
||||||
response.add(token);
|
response.add(token);
|
||||||
@ -92,6 +90,8 @@ public class ImapResponseParser {
|
|||||||
|
|
||||||
void parseStatusResponse(ImapResponse parent) throws IOException {
|
void parseStatusResponse(ImapResponse parent) throws IOException {
|
||||||
|
|
||||||
|
skipIfSpace();
|
||||||
|
|
||||||
int next = mIn.peek();
|
int next = mIn.peek();
|
||||||
if (next == '[') {
|
if (next == '[') {
|
||||||
parseSequence(parent);
|
parseSequence(parent);
|
||||||
|
Loading…
Reference in New Issue
Block a user