Fixes from audit
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2271 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
e81fb6b5ca
commit
9f28a4a80d
|
@ -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 {
|
||||||
&& !"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 {
|
||||||
}
|
}
|
||||||
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";
|
||||||
|
|
Loading…
Reference in New Issue