diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index 91988b3e..958c88b1 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -1198,6 +1198,12 @@ public abstract class ExchangeSession { */ public abstract void moveFolder(String folderName, String targetName) throws IOException; + /** + * Move item from source path to target path. + * @param sourcePath item source path + * @param targetPath item target path + * @throws IOException on error + */ public abstract void moveItem(String sourcePath, String targetPath) throws IOException; protected abstract void moveToTrash(Message message) throws IOException; @@ -2487,11 +2493,11 @@ public abstract class ExchangeSession { } } - protected static final String[] VCARD_N_PROPERTIES = {"sn", "givenName", "middlename", "personaltitle", "namesuffix"}; - protected static final String[] VCARD_ADR_HOME_PROPERTIES = {"homepostofficebox", null, "homeStreet", "homeCity", "homeState", "homePostalCode", "homeCountry"}; - protected static final String[] VCARD_ADR_WORK_PROPERTIES = {"postofficebox", "roomnumber", "street", "l", "st", "postalcode", "co"}; - protected static final String[] VCARD_ADR_OTHER_PROPERTIES = {"otherpostofficebox", null, "otherstreet", "othercity", "otherstate", "otherpostalcode", "othercountry"}; - protected static final String[] VCARD_ORG_PROPERTIES = {"o", "department"}; + static final String[] VCARD_N_PROPERTIES = {"sn", "givenName", "middlename", "personaltitle", "namesuffix"}; + static final String[] VCARD_ADR_HOME_PROPERTIES = {"homepostofficebox", null, "homeStreet", "homeCity", "homeState", "homePostalCode", "homeCountry"}; + static final String[] VCARD_ADR_WORK_PROPERTIES = {"postofficebox", "roomnumber", "street", "l", "st", "postalcode", "co"}; + static final String[] VCARD_ADR_OTHER_PROPERTIES = {"otherpostofficebox", null, "otherstreet", "othercity", "otherstate", "otherpostalcode", "othercountry"}; + static final String[] VCARD_ORG_PROPERTIES = {"o", "department"}; protected void convertContactProperties(Map properties, String[] contactProperties, List values) { for (int i = 0; i < values.size() && i < contactProperties.length; i++) { diff --git a/src/java/davmail/imap/ImapConnection.java b/src/java/davmail/imap/ImapConnection.java index 0696ff99..fab84574 100644 --- a/src/java/davmail/imap/ImapConnection.java +++ b/src/java/davmail/imap/ImapConnection.java @@ -657,9 +657,11 @@ public class ImapConnection extends AbstractConnection { } else if (param.startsWith("BODY[") || param.startsWith("BODY.PEEK[") || "RFC822.HEADER".equals(param)) { // get full param if (param.indexOf('[') >= 0) { + StringBuilder paramBuffer = new StringBuilder(param); while (paramTokens.hasMoreTokens() && param.indexOf(']') < 0) { - param += ' ' + paramTokens.nextToken(); + paramBuffer.append(' ').append(paramTokens.nextToken()); } + param = paramBuffer.toString(); } // parse buffer size int startIndex = 0;