mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-21 23:18:49 -05:00
EWS: avoid NullPointerException in fixAttendees
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2306 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
448c72895a
commit
d071c59e4a
@ -1868,20 +1868,22 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void fixAttendees(GetItemMethod getItemMethod, VObject vEvent) throws EWSException {
|
protected void fixAttendees(GetItemMethod getItemMethod, VObject vEvent) throws EWSException {
|
||||||
List<EWSMethod.Attendee> attendees = getItemMethod.getResponseItem().getAttendees();
|
if (getItemMethod.getResponseItem() != null) {
|
||||||
if (attendees != null) {
|
List<EWSMethod.Attendee> attendees = getItemMethod.getResponseItem().getAttendees();
|
||||||
for (EWSMethod.Attendee attendee : attendees) {
|
if (attendees != null) {
|
||||||
VProperty attendeeProperty = new VProperty("ATTENDEE", "mailto:" + attendee.email);
|
for (EWSMethod.Attendee attendee : attendees) {
|
||||||
attendeeProperty.addParam("CN", attendee.name);
|
VProperty attendeeProperty = new VProperty("ATTENDEE", "mailto:" + attendee.email);
|
||||||
String myResponseType = getItemMethod.getResponseItem().get(Field.get("myresponsetype").getResponseName());
|
attendeeProperty.addParam("CN", attendee.name);
|
||||||
if (email.equalsIgnoreCase(attendee.email) && myResponseType != null) {
|
String myResponseType = getItemMethod.getResponseItem().get(Field.get("myresponsetype").getResponseName());
|
||||||
attendeeProperty.addParam("PARTSTAT", EWSMethod.responseTypeToPartstat(myResponseType));
|
if (email.equalsIgnoreCase(attendee.email) && myResponseType != null) {
|
||||||
} else {
|
attendeeProperty.addParam("PARTSTAT", EWSMethod.responseTypeToPartstat(myResponseType));
|
||||||
attendeeProperty.addParam("PARTSTAT", attendee.partstat);
|
} 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user