diff --git a/UnitsNet/CustomCode/UnitParser.cs b/UnitsNet/CustomCode/UnitParser.cs index aecc6d526d..d3dab403cc 100644 --- a/UnitsNet/CustomCode/UnitParser.cs +++ b/UnitsNet/CustomCode/UnitParser.cs @@ -23,11 +23,11 @@ public sealed class UnitParser /// /// Create a parser using the given unit abbreviations cache. /// - /// - // TODO Change this to not fallback to built-in units abbreviations when given null, in v6: https://github.com/angularsen/UnitsNet/issues/1200 - public UnitParser(UnitAbbreviationsCache? unitAbbreviationsCache) + /// The unit abbreviations to parse with. + /// No unit abbreviations cache was given. + public UnitParser(UnitAbbreviationsCache unitAbbreviationsCache) { - _unitAbbreviationsCache = unitAbbreviationsCache ?? UnitsNetSetup.Default.UnitAbbreviations; + _unitAbbreviationsCache = unitAbbreviationsCache ?? throw new ArgumentNullException(nameof(unitAbbreviationsCache)); } ///