Skip to content

[Uri] FxCop: System.Uri locks on a string. #19130

@alexperovich

Description

@alexperovich

This came from running FxCop analyzers on corefx. Reproduce steps found here.

"E:\corefx\src\src.builds" (default target) (1) ->
"E:\corefx\src\System.Private.Uri\src\System.Private.Uri.builds" (Build target) (293) ->
"E:\corefx\src\System.Private.Uri\src\System.Private.Uri.csproj" (Build target) (44:7) ->
System\Uri.cs(2427,19): error CA2002: Do not lock on a reference of type 'string' as it has weak identity. Replace that with a lock against an object with strong identity. [E:\corefx\src\System.Private.Uri\src\System.Private.Uri.csproj]

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions