Skip to content

Some nullable parameters are null-checked #58929

@RikkiGibson

Description

@RikkiGibson

public static WorkspaceRegistration GetWorkspaceRegistration(SourceTextContainer? textContainer)
{
if (textContainer == null)
{
throw new ArgumentNullException(nameof(textContainer));
}

public static Uri GetUriFromFilePath(string? filePath)
{
if (filePath is null)
throw new ArgumentNullException(nameof(filePath));

cc @genlu @dibarbet @CyrusNajmabadi

It seems like if the parameter type allows null, then the parameter should not be null checked.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions