From coverity: use getParamValue instead of getParam().getValue() to avoid null dereference
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2235 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
9c48dd351f
commit
9f0a87c5a5
|
@ -479,8 +479,7 @@ public class VCalendar extends VObject {
|
||||||
// than PARTSTAT=NEEDS-ACTION since the RSVP confuses iCal4 into
|
// than PARTSTAT=NEEDS-ACTION since the RSVP confuses iCal4 into
|
||||||
// thinking the attendee has not replied
|
// thinking the attendee has not replied
|
||||||
if (isCurrentUser(property) && property.hasParam("RSVP", "TRUE")) {
|
if (isCurrentUser(property) && property.hasParam("RSVP", "TRUE")) {
|
||||||
VProperty.Param partstat = property.getParam("PARTSTAT");
|
if (!"NEEDS-ACTION".equals(property.getParamValue("PARTSTAT"))) {
|
||||||
if (partstat == null || !"NEEDS-ACTION".equals(partstat.getValue())) {
|
|
||||||
property.removeParam("RSVP");
|
property.removeParam("RSVP");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -733,7 +732,7 @@ public class VCalendar extends VObject {
|
||||||
String attendeeEmail = getEmailValue(property);
|
String attendeeEmail = getEmailValue(property);
|
||||||
if (email.equalsIgnoreCase(attendeeEmail) && property.hasParam("PARTSTAT")) {
|
if (email.equalsIgnoreCase(attendeeEmail) && property.hasParam("PARTSTAT")) {
|
||||||
// found current user attendee line
|
// found current user attendee line
|
||||||
status = property.getParam("PARTSTAT").getValue();
|
status = property.getParamValue("PARTSTAT");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class VProperty {
|
||||||
values.addAll(paramValues);
|
values.addAll(paramValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getValue() {
|
protected String getValue() {
|
||||||
if (values != null && !values.isEmpty()) {
|
if (values != null && !values.isEmpty()) {
|
||||||
return values.get(0);
|
return values.get(0);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue