am d896fa8a: Merge "Fix an NPE in sendCommandInternal" into ub-mail-algol
* commit 'd896fa8a2ea455a58deb415b9456e6fadefe3fd0': Fix an NPE in sendCommandInternal
This commit is contained in:
commit
816474e8ef
|
@ -280,6 +280,9 @@ class ImapConnection {
|
||||||
|
|
||||||
String sendCommandInternal(String command, boolean sensitive)
|
String sendCommandInternal(String command, boolean sensitive)
|
||||||
throws MessagingException, IOException {
|
throws MessagingException, IOException {
|
||||||
|
if (mTransport == null) {
|
||||||
|
throw new IOException("Null transport");
|
||||||
|
}
|
||||||
String tag = Integer.toString(mNextCommandTag.incrementAndGet());
|
String tag = Integer.toString(mNextCommandTag.incrementAndGet());
|
||||||
String commandToSend = tag + " " + command;
|
String commandToSend = tag + " " + command;
|
||||||
mTransport.writeLine(commandToSend, sensitive ? IMAP_REDACTED_LOG : null);
|
mTransport.writeLine(commandToSend, sensitive ? IMAP_REDACTED_LOG : null);
|
||||||
|
@ -287,7 +290,6 @@ class ImapConnection {
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a single, complex command to the server. The command will be preceded by an IMAP
|
* Send a single, complex command to the server. The command will be preceded by an IMAP
|
||||||
* command tag and followed by \r\n (caller need not supply them). After each piece of the
|
* command tag and followed by \r\n (caller need not supply them). After each piece of the
|
||||||
|
|
Loading…
Reference in New Issue