Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullable annotation fixes #82803

Merged
merged 2 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public override bool IsValid(ITypeDescriptorContext? context, object? value)
{
if (value is string version)
{
return Version.TryParse(version, out Version _);
return Version.TryParse(version, out Version? _);
jaredpar marked this conversation as resolved.
Show resolved Hide resolved
}
return value is Version;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ private void RemoveStalePools()
{
if (entry.Value.CleanCacheAndDisposeIfUnused())
{
_pools.TryRemove(entry.Key, out HttpConnectionPool _);
_pools.TryRemove(entry.Key, out HttpConnectionPool? _);
jaredpar marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ public static TimeZoneInfo CreateCustomTimeZone(
string? displayName,
string? standardDisplayName)
{
bool hasIanaId = TimeZoneInfo.TryConvertIanaIdToWindowsId(id, allocate: false, out string _);
bool hasIanaId = TimeZoneInfo.TryConvertIanaIdToWindowsId(id, allocate: false, out string? _);
jaredpar marked this conversation as resolved.
Show resolved Hide resolved

return new TimeZoneInfo(
id,
Expand Down Expand Up @@ -942,7 +942,7 @@ public static TimeZoneInfo CreateCustomTimeZone(
adjustmentRules = (AdjustmentRule[])adjustmentRules.Clone();
}

bool hasIanaId = TimeZoneInfo.TryConvertIanaIdToWindowsId(id, allocate: false, out string _);
bool hasIanaId = TimeZoneInfo.TryConvertIanaIdToWindowsId(id, allocate: false, out string? _);
jaredpar marked this conversation as resolved.
Show resolved Hide resolved

return new TimeZoneInfo(
id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ internal IEnumerator<KeyValuePair<XmlQualifiedName, DataContract>> GetEnumerator
public void ImportSchemaSet(XmlSchemaSet schemaSet, IEnumerable<XmlQualifiedName>? typeNames, bool importXmlDataType)
{
SchemaImporter importer = new SchemaImporter(schemaSet, typeNames, null, this, importXmlDataType);
importer.Import(out List<XmlQualifiedName> _);
importer.Import(out List<XmlQualifiedName>? _);
jaredpar marked this conversation as resolved.
Show resolved Hide resolved
}

[RequiresDynamicCode(DataContract.SerializerAOTWarning)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ internal EcmaFatMethodParameter(IRoMethodBase roMethodBase, int position, Type p

protected sealed override IEnumerable<CustomAttributeData> GetTrueCustomAttributes() => Parameter.GetCustomAttributes().ToTrueCustomAttributes(GetEcmaModule());

public sealed override bool HasDefaultValue => TryGetRawDefaultValue(out object _);
public sealed override bool HasDefaultValue => TryGetRawDefaultValue(out object? _);
jaredpar marked this conversation as resolved.
Show resolved Hide resolved

public sealed override object? RawDefaultValue
{
Expand Down