Closed buxit closed 7 years ago
Which version of OH is this from?
i tested this with a prerelease version of oh 2.0 from winter 2016/2017. not sure how to read out the version of oh as it is conglomerate of lots of different packages.
org.openhab.io.caldav:1.9.0.201610120713 apparently doesn't give enough info?
branch beta3 seems to match. see: https://github.com/openhab/openhab1-addons/blob/beta3/bundles/io/org.openhab.io.caldav/src/main/java/org/openhab/io/caldav/internal/job/EventReloaderJob.java#L321 https://github.com/openhab/openhab1-addons/blob/beta3/bundles/io/org.openhab.io.caldav/src/main/java/org/openhab/io/caldav/internal/job/EventReloaderJob.java#L279
Here's a test jar that I think should fix the problem. I've been unable to verify as I can't find a way to set a null title in Google calendar.
Can you try this out and see what you get?
still looks similar:
16:43:04.387 [INFO ] [core.karaf.internal.FeatureInstaller] - Installed 'openhab-binding-caldav-command1'
16:43:04.402 [INFO ] [smarthome.event.ExtensionEvent ] - Extension 'binding-caldav-command1' has been installed.
16:43:19.787 [ERROR] [caldav.internal.job.EventReloaderJob] - error while loading calendar entries: null
java.lang.NullPointerException
at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:397)[180:org.openhab.io.caldav:1.10.0.201703260421]
at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:316)[180:org.openhab.io.caldav:1.10.0.201703260421]
at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:135)[180:org.openhab.io.caldav:1.10.0.201703260421]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)[102:org.eclipse.smarthome.core.scheduler:0.9.0.201612171108]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)[102:org.eclipse.smarthome.core.scheduler:0.9.0.201612171108]
(for future tests: is there a faster alternative to rm -r cache
in order to make it load the new code?)
It appears I overlooked an occurrence of the getSummary() call. I updated the jar; try downloading it again and see what you get.
I wouldn't have thought clearing the cache would be necessary, though.
this seems to fix it.
Great. I have a little testing left to do, then I'll create a PR.
i wonder if it wouldn't make more sense to return a valid value from getSummary()
, even if the title was empty. similar crashes may otherwise surface in other places.
We don't have control of getSummary(), since it's an ical4j method.
You could try logging a defect against ical4j.
if there is a calendar event with an empty title, the importer crashes and imports no other events.