mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
IMAP: fix from audit
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@983 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
3e4d4e58b3
commit
28c02c9a3a
@ -535,6 +535,7 @@ public class ImapConnection extends AbstractConnection {
|
||||
if (parameters != null) {
|
||||
StringTokenizer paramTokens = new StringTokenizer(parameters);
|
||||
while (paramTokens.hasMoreTokens()) {
|
||||
@SuppressWarnings({"NonConstantStringShouldBeStringBuffer"})
|
||||
String param = paramTokens.nextToken();
|
||||
if ("FLAGS".equals(param)) {
|
||||
buffer.append(" FLAGS (").append(message.getImapFlags()).append(')');
|
||||
@ -583,7 +584,6 @@ public class ImapConnection extends AbstractConnection {
|
||||
|
||||
// load message
|
||||
MimeMessage mimeMessage = message.getMimeMessage();
|
||||
int partIndex = 0;
|
||||
// try to parse message part index
|
||||
String partIndexString = StringUtil.getToken(param, "[", "]");
|
||||
if ("".equals(partIndexString)) {
|
||||
@ -596,6 +596,7 @@ public class ImapConnection extends AbstractConnection {
|
||||
// write headers only
|
||||
mimeMessage.writeTo(new PartOutputStream(baos, true, false, startIndex, maxSize));
|
||||
} else {
|
||||
int partIndex;
|
||||
// try to parse part index
|
||||
try {
|
||||
partIndex = Integer.parseInt(partIndexString);
|
||||
|
Loading…
x
Reference in New Issue
Block a user