Source:
<code>public List<? extends Message> appendWebDavMessages(List<? extends Message> messages) throws MessagingException { List<Message> retMessages = new ArrayList<Message>(messages.size()); WebDavHttpClient httpclient = store.getHttpClient(); for (Message message : messages) { HttpGeneric httpmethod; HttpResponse response; StringEntity bodyEntity; int statusCode; try { ByteArrayOutputStream out; long size = message.getSize(); if (size > Integer.MAX_VALUE) { <START> size = Integer.MAX_VALUE; <END> } out = new ByteArrayOutputStream((int) size); open(Folder.OPEN_MODE_RW); EOLConvertingOutputStream msgOut = new EOLConvertingOutputStream( new BufferedOutputStream(out, 1024)); message.writeTo(msgOut); msgOut.flush(); bodyEntity = new StringEntity(out.toString(), "UTF-8"); bodyEntity.setContentType("message/rfc822"); String messageURL = mFolderUrl; if (!messageURL.endsWith("/")) { messageURL += "/"; } messageURL += encodeUtf8(message.getUid() + ":" + System.currentTimeMillis() + ".eml"); Log.i(LOG_TAG, "Uploading message as " + messageURL); httpmethod = new HttpGeneric(messageURL); httpmethod.setMethod("PUT"); httpmethod.setEntity(bodyEntity); String mAuthString = store.getAuthString(); if (mAuthString != null) { httpmethod.setHeader("Authorization", mAuthString); } response = httpclient.executeOverride(httpmethod, store.getContext()); statusCode = response.getStatusLine().getStatusCode(); if (statusCode < 200 || statusCode > 300) { throw new IOException("Error with status code " + statusCode + " while sending/appending message. Response = " + response.getStatusLine().toString() + " for message " + messageURL); } WebDavMessage retMessage = new WebDavMessage(message.getUid(), this); retMessage.setUrl(messageURL); retMessages.add(retMessage); } catch (Exception e) { throw new MessagingException("Unable to append", e); } } return retMessages; }</code><technical_language>throw here</technical_language>

Target:
public List<? extends Message> appendWebDavMessages(List<? extends Message> messages) throws MessagingException { List<Message> retMessages = new ArrayList<Message>(messages.size()); WebDavHttpClient httpclient = store.getHttpClient(); for (Message message : messages) { HttpGeneric httpmethod; HttpResponse response; StringEntity bodyEntity; int statusCode; try { ByteArrayOutputStream out; long size = message.getSize(); if (size > Integer.MAX_VALUE) { throw new MessagingException("message size > Integer.MAX_VALUE!"); } out = new ByteArrayOutputStream((int) size); open(Folder.OPEN_MODE_RW); EOLConvertingOutputStream msgOut = new EOLConvertingOutputStream( new BufferedOutputStream(out, 1024)); message.writeTo(msgOut); msgOut.flush(); bodyEntity = new StringEntity(out.toString(), "UTF-8"); bodyEntity.setContentType("message/rfc822"); String messageURL = mFolderUrl; if (!messageURL.endsWith("/")) { messageURL += "/"; } messageURL += encodeUtf8(message.getUid() + ":" + System.currentTimeMillis() + ".eml"); Log.i(LOG_TAG, "Uploading message as " + messageURL); httpmethod = new HttpGeneric(messageURL); httpmethod.setMethod("PUT"); httpmethod.setEntity(bodyEntity); String mAuthString = store.getAuthString(); if (mAuthString != null) { httpmethod.setHeader("Authorization", mAuthString); } response = httpclient.executeOverride(httpmethod, store.getContext()); statusCode = response.getStatusLine().getStatusCode(); if (statusCode < 200 || statusCode > 300) { throw new IOException("Error with status code " + statusCode + " while sending/appending message. Response = " + response.getStatusLine().toString() + " for message " + messageURL); } WebDavMessage retMessage = new WebDavMessage(message.getUid(), this); retMessage.setUrl(messageURL); retMessages.add(retMessage); } catch (Exception e) { throw new MessagingException("Unable to append", e); } } return retMessages; }