Commit 91f3d274 authored by Mickaël Guessant's avatar Mickaël Guessant

Fixes from audit

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2271 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent 73ff133f
...@@ -647,9 +647,9 @@ public abstract class EWSMethod extends PostMethod { ...@@ -647,9 +647,9 @@ public abstract class EWSMethod extends PostMethod {
public FileAttachment getAttachmentByName(String attachmentName) { public FileAttachment getAttachmentByName(String attachmentName) {
FileAttachment result = null; FileAttachment result = null;
if (attachments != null) { if (attachments != null) {
for (FileAttachment attachment : attachments) { for (FileAttachment fileAttachment : attachments) {
if (attachmentName.equals(attachment.name)) { if (attachmentName.equals(fileAttachment.name)) {
result = attachment; result = fileAttachment;
break; break;
} }
} }
...@@ -712,7 +712,7 @@ public abstract class EWSMethod extends PostMethod { ...@@ -712,7 +712,7 @@ public abstract class EWSMethod extends PostMethod {
&& !"ErrorItemNotFound".equals(errorDetail) && !"ErrorItemNotFound".equals(errorDetail)
) { ) {
try { try {
throw new EWSException(errorDetail +" "+((errorDescription!=null)?errorDescription:"")+ "\n request: " + new String(generateSoapEnvelope(), "UTF-8")); throw new EWSException(errorDetail + ' ' +((errorDescription!=null)?errorDescription:"")+ "\n request: " + new String(generateSoapEnvelope(), "UTF-8"));
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
throw new EWSException(e.getMessage()); throw new EWSException(e.getMessage());
} }
...@@ -905,7 +905,12 @@ public abstract class EWSMethod extends PostMethod { ...@@ -905,7 +905,12 @@ public abstract class EWSMethod extends PostMethod {
} }
item.addOccurrence(occurrence); item.addOccurrence(occurrence);
} }
/**
* Convert response type to partstat value
* @param responseType response type
* @return partstat value
*/
public static String responseTypeToPartstat(String responseType) { public static String responseTypeToPartstat(String responseType) {
if ("Accept".equals(responseType) || "Organizer".equals(responseType)) { if ("Accept".equals(responseType) || "Organizer".equals(responseType)) {
return "ACCEPTED"; return "ACCEPTED";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment