Skip to content

Commit

Permalink
Fix sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
adams85 committed Oct 5, 2023
1 parent f043974 commit fc231c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ConfigCatClient/Models/SettingValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ public readonly TValue GetValue<TValue>(SettingType settingType)
// In the case of Int settings, we also allow long and long? return types.
return typeof(TValue) switch
{
var type when type == typeof(long) => value.Cast<object, TValue>(ObjectExtensions.BoxedIntToLong),
var type when type == typeof(long?) => value.Cast<object, TValue>(ObjectExtensions.BoxedIntToNullableLong),
_ when typeof(TValue) == typeof(long) => value.Cast<object, TValue>(ObjectExtensions.BoxedIntToLong),
_ when typeof(TValue) == typeof(long?) => value.Cast<object, TValue>(ObjectExtensions.BoxedIntToNullableLong),
_ => (TValue)value,
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/ConfigCatClient/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static string AttributeValueFrom(params string[] items)
/// <returns>The User Object attribute value in the expected format.</returns>
public static string AttributeValueFrom(IEnumerable<string> items)
{
return (items ?? throw new ArgumentNullException("items")).Serialize();
return (items ?? throw new ArgumentNullException(nameof(items))).Serialize();
}

internal const string DefaultIdentifierValue = "";
Expand Down

0 comments on commit fc231c4

Please sign in to comment.