[ 
https://issues.apache.org/jira/browse/CAMEL-26001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18130934#comment-18130934
 ] 

Claus Ibsen commented on CAMEL-26001:
-------------------------------------

Fix in PR https://github.com/apache/camel/pull/28355 (one PR for the 16 data 
format tickets CAMEL-25995 to CAMEL-26011, except CAMEL-26000). The PR 
description lists the change per ticket.

_Claude Code on behalf of davsclaus_

> camel-ical - marshal of a body that is not a Calendar fails with a 
> NullPointerException
> ---------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26001
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26001
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 4.18.0, 4.22.0, 4.23.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> The ical data format converts the body with {{convertTo(Calendar.class, 
> graph)}} ({{ICalDataFormat}}, main 50d17f9c2614, line 48), not 
> {{mandatoryConvertTo}}. There is no type converter to {{Calendar}}, so any 
> other body, for example the iCalendar text, becomes null. ical4j then fails 
> with {{NullPointerException: Cannot invoke 
> "net.fortuna.ical4j.model.Calendar.toString()" because "calendar" is null}}, 
> which does not say that the body is not a Calendar.
> Checked on 4.24.0-SNAPSHOT with {{camel run}}: {{marshal: ical}} of the text 
> of a {{.ics}} file gives that NullPointerException, while the {{Calendar}} 
> that {{unmarshal: ical}} gives is marshalled.
> *Proposed change*: use {{mandatoryConvertTo}}, so the error says that no type 
> converter makes a {{Calendar}} of the body.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to