Skip to content

Commit 50ba1c1

Browse files
authored
Fixing the nullability attribute of the AbbreviatedUnitsConverter (build failure) (#1457)
fixing the nullability of the `unitAbbreviation` in the Parse method (following the build failure from #1446 ) BTW, note that this method isn't even used anywhere. I'm not sure if we've ever used it and then stopped or if it was meant to serve another purpose (having _extended_ the converter)..
1 parent e294419 commit 50ba1c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UnitsNet.Serialization.JsonNet/AbbreviatedUnitsConverter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ protected virtual Enum GetUnitOrDefault(string? unitAbbreviation, QuantityInfo q
263263
/// <returns>Unit enum value, such as <see cref="MassUnit.Kilogram" />.</returns>
264264
/// <exception cref="UnitNotFoundException">No units match the abbreviation.</exception>
265265
/// <exception cref="AmbiguousUnitParseException">More than one unit matches the abbreviation.</exception>
266-
protected Enum Parse(string? unitAbbreviation, QuantityInfo quantityInfo)
266+
protected Enum Parse(string unitAbbreviation, QuantityInfo quantityInfo)
267267
{
268268
return _unitParser.Parse(unitAbbreviation, quantityInfo.UnitType, CultureInfo.InvariantCulture);
269269
}

0 commit comments

Comments
 (0)