Commit df18e97c authored by Mickaël Guessant's avatar Mickaël Guessant

EWS: avoid NullPointerException in fixAttendees

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2306 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent 55b42e26
......@@ -1868,20 +1868,22 @@ public class EwsExchangeSession extends ExchangeSession {
}
protected void fixAttendees(GetItemMethod getItemMethod, VObject vEvent) throws EWSException {
List<EWSMethod.Attendee> attendees = getItemMethod.getResponseItem().getAttendees();
if (attendees != null) {
for (EWSMethod.Attendee attendee : attendees) {
VProperty attendeeProperty = new VProperty("ATTENDEE", "mailto:" + attendee.email);
attendeeProperty.addParam("CN", attendee.name);
String myResponseType = getItemMethod.getResponseItem().get(Field.get("myresponsetype").getResponseName());
if (email.equalsIgnoreCase(attendee.email) && myResponseType != null) {
attendeeProperty.addParam("PARTSTAT", EWSMethod.responseTypeToPartstat(myResponseType));
} else {
attendeeProperty.addParam("PARTSTAT", attendee.partstat);
if (getItemMethod.getResponseItem() != null) {
List<EWSMethod.Attendee> attendees = getItemMethod.getResponseItem().getAttendees();
if (attendees != null) {
for (EWSMethod.Attendee attendee : attendees) {
VProperty attendeeProperty = new VProperty("ATTENDEE", "mailto:" + attendee.email);
attendeeProperty.addParam("CN", attendee.name);
String myResponseType = getItemMethod.getResponseItem().get(Field.get("myresponsetype").getResponseName());
if (email.equalsIgnoreCase(attendee.email) && myResponseType != null) {
attendeeProperty.addParam("PARTSTAT", EWSMethod.responseTypeToPartstat(myResponseType));
} else {
attendeeProperty.addParam("PARTSTAT", attendee.partstat);
}
//attendeeProperty.addParam("RSVP", "TRUE");
attendeeProperty.addParam("ROLE", attendee.role);
vEvent.addProperty(attendeeProperty);
}
//attendeeProperty.addParam("RSVP", "TRUE");
attendeeProperty.addParam("ROLE", attendee.role);
vEvent.addProperty(attendeeProperty);
}
}
}
......
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