You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/12/18 12:45:03 UTC
[camel] branch camel-3.4.x updated: avoid NPE on missing event
update datetime
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch camel-3.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.4.x by this push:
new a566d34 avoid NPE on missing event update datetime
a566d34 is described below
commit a566d340649000e808f1bbac795dbf5943051340
Author: jmerljak <jm...@users.noreply.github.com>
AuthorDate: Wed Dec 16 16:13:38 2020 +0100
avoid NPE on missing event update datetime
---
.../google/calendar/stream/GoogleCalendarStreamConsumer.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/stream/GoogleCalendarStreamConsumer.java b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/stream/GoogleCalendarStreamConsumer.java
index 9fb9844..a9634a7 100644
--- a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/stream/GoogleCalendarStreamConsumer.java
+++ b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/stream/GoogleCalendarStreamConsumer.java
@@ -87,7 +87,10 @@ public class GoogleCalendarStreamConsumer extends ScheduledBatchPollingConsumer
for (Event event : list) {
Exchange exchange = getEndpoint().createExchange(getEndpoint().getExchangePattern(), event);
answer.add(exchange);
- dateList.add(new Date(event.getUpdated().getValue()));
+ DateTime updated = event.getUpdated();
+ if (updated != null) {
+ dateList.add(new Date(updated.getValue()));
+ }
}
}