Skip to content

Conversation

@minichma
Copy link
Collaborator

TODO's don't necessarily have a duration, so the occurrences returned by GetOccurrences may return an EffectiveDuration of null. Such cases caused an NPE that is fixed with this PR.

fixes #824

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Jun 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

❌ Your project status has failed because the head coverage (68%) is below the target coverage (80%). You can increase the head coverage or adjust the target coverage.

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #826   +/-   ##
===================================
  Coverage    68%    68%           
===================================
  Files       106    106           
  Lines      4209   4209           
  Branches    945    945           
===================================
  Hits       2842   2842           
  Misses     1039   1039           
  Partials    328    328           
Files with missing lines Coverage Δ
Ical.Net/Evaluation/RecurrenceUtil.cs 100% <100%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@minichma minichma requested a review from axunonb June 26, 2025 15:40
@minichma minichma changed the title GetOccurrences(): Fix NPE when return a ToDo's occurrences that don't have a duration GetOccurrences(): Fix NPE when returning a ToDo's occurrences that don't have a duration Jun 26, 2025
Copy link
Collaborator

@axunonb axunonb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing and including this important test case

@minichma minichma merged commit 602c5b5 into main Jun 26, 2025
8 of 9 checks passed
@minichma minichma deleted the work/minichma/bugfix/todo_occurrence_npe branch June 26, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting occurrences of a Todo throws NullReferenceException on GetOccurrences with DateOnly start time.

3 participants