Skip to content

Commit

Permalink
Fix Nullable reference types
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Sep 17, 2024
1 parent fc24840 commit dcf550a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Nager.Date/HolidaySpecificationProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal static IEnumerable<Holiday> Process(
EnglishName = holidaySpecification.EnglishName,
LocalName = holidaySpecification.LocalName,
HolidayTypes = holidaySpecification.HolidayTypes,
SubdivisionCodes = holidaySpecification.SubdivisionCodes,
SubdivisionCodes = holidaySpecification.SubdivisionCodes ?? [],
ObservedDate = holidaySpecification.ObservedRuleSet?.GetObservedDate(holidayDate) ?? holidayDate,
CountryCode = countryCode
};
Expand Down
12 changes: 6 additions & 6 deletions src/Nager.Date/ReligiousProviders/CatholicProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public DateTime AdventSunday(int year)
public HolidaySpecification MaundyThursday(
string localName,
int year,
ObservedRuleSet observedRuleSet = null)
ObservedRuleSet? observedRuleSet = null)
{
var easterSunday = this.EasterSunday(year);

Expand Down Expand Up @@ -103,7 +103,7 @@ public HolidaySpecification EasterSaturday(
public HolidaySpecification EasterSunday(
string localName,
int year,
ObservedRuleSet observedRuleSet = null)
ObservedRuleSet? observedRuleSet = null)
{
var easterSunday = this.EasterSunday(year);

Expand All @@ -121,7 +121,7 @@ public HolidaySpecification EasterSunday(
public HolidaySpecification EasterMonday(
string localName,
int year,
ObservedRuleSet observedRuleSet = null)
ObservedRuleSet? observedRuleSet = null)
{
var easterSunday = this.EasterSunday(year);

Expand All @@ -139,7 +139,7 @@ public HolidaySpecification EasterMonday(
public HolidaySpecification AscensionDay(
string localName,
int year,
ObservedRuleSet observedRuleSet = null)
ObservedRuleSet? observedRuleSet = null)
{
var easterSunday = this.EasterSunday(year);

Expand All @@ -157,7 +157,7 @@ public HolidaySpecification AscensionDay(
public HolidaySpecification Pentecost(
string localName,
int year,
ObservedRuleSet observedRuleSet = null)
ObservedRuleSet? observedRuleSet = null)
{
var easterSunday = this.EasterSunday(year);

Expand Down Expand Up @@ -193,7 +193,7 @@ public HolidaySpecification WhitMonday(
public HolidaySpecification CorpusChristi(
string localName,
int year,
ObservedRuleSet observedRuleSet = null)
ObservedRuleSet? observedRuleSet = null)
{
var easterSunday = this.EasterSunday(year);

Expand Down
2 changes: 1 addition & 1 deletion src/Nager.Date/ReligiousProviders/IOrthodoxProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public interface IOrthodoxProvider
HolidaySpecification GoodFriday(
string localName,
int year,
ObservedRuleSet observedRuleSet = null);
ObservedRuleSet? observedRuleSet = null);

/// <summary>
/// Get Holy Saturday
Expand Down
2 changes: 1 addition & 1 deletion src/Nager.Date/ReligiousProviders/OrthodoxProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int y when (y >= 3300 && y <= 3399) => 23,
public HolidaySpecification GoodFriday(
string localName,
int year,
ObservedRuleSet observedRuleSet = null)
ObservedRuleSet? observedRuleSet = null)
{
var easterSunday = this.EasterSunday(year);

Expand Down

0 comments on commit dcf550a

Please sign in to comment.