From e67914ae40b2a6143adbcda527370fab25666ff5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 01:12:30 +0000 Subject: [PATCH 1/6] Initial plan From 87161f504e7b5d5a03616ca8f340bd963004a907 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 01:16:10 +0000 Subject: [PATCH 2/6] Document thread-safety concerns for NullabilityInfoContext Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- xml/System.Reflection/NullabilityInfoContext.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xml/System.Reflection/NullabilityInfoContext.xml b/xml/System.Reflection/NullabilityInfoContext.xml index 2abcb3f555a..fd85bab6211 100644 --- a/xml/System.Reflection/NullabilityInfoContext.xml +++ b/xml/System.Reflection/NullabilityInfoContext.xml @@ -26,6 +26,7 @@ Provides APIs for populating nullability information and context from reflection members: , , , and . To be added. + This type is not thread-safe. The , , , and methods can't be called concurrently from multiple threads, as they use a non-concurrent cache internally. Concurrent calls can result in an . If you need to use from multiple threads, create a separate instance for each thread or use external synchronization. @@ -75,7 +76,7 @@ The event for which to populate nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - To be added. + This method is not thread-safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . is . @@ -106,7 +107,7 @@ The field for which to populate the nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - To be added. + This method is not thread-safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . is . @@ -137,7 +138,7 @@ The parameter for which to populate the nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - To be added. + This method is not thread-safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . is . @@ -168,7 +169,7 @@ The property for which to populate the nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - To be added. + This method is not thread-safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . is . From f4705b84fbec565485e4c1f7a048dbb9225feaf1 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 26 Jan 2026 19:31:16 -0800 Subject: [PATCH 3/6] Update xml/System.Reflection/NullabilityInfoContext.xml --- xml/System.Reflection/NullabilityInfoContext.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Reflection/NullabilityInfoContext.xml b/xml/System.Reflection/NullabilityInfoContext.xml index fd85bab6211..e943713a361 100644 --- a/xml/System.Reflection/NullabilityInfoContext.xml +++ b/xml/System.Reflection/NullabilityInfoContext.xml @@ -26,7 +26,7 @@ Provides APIs for populating nullability information and context from reflection members: , , , and . To be added. - This type is not thread-safe. The , , , and methods can't be called concurrently from multiple threads, as they use a non-concurrent cache internally. Concurrent calls can result in an . If you need to use from multiple threads, create a separate instance for each thread or use external synchronization. + This type is not thread-safe. The methods can't be called concurrently from multiple threads, as they use a non-concurrent cache internally. Concurrent calls can result in an . If you need to use from multiple threads, create a separate instance for each thread or use external synchronization. From d103db79188b919309449a90c3e49a5d296fe597 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 08:45:08 +0000 Subject: [PATCH 4/6] Update thread-safety documentation per review feedback Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com> --- xml/System.Reflection/NullabilityInfoContext.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xml/System.Reflection/NullabilityInfoContext.xml b/xml/System.Reflection/NullabilityInfoContext.xml index e943713a361..753271049b5 100644 --- a/xml/System.Reflection/NullabilityInfoContext.xml +++ b/xml/System.Reflection/NullabilityInfoContext.xml @@ -26,7 +26,7 @@ Provides APIs for populating nullability information and context from reflection members: , , , and . To be added. - This type is not thread-safe. The methods can't be called concurrently from multiple threads, as they use a non-concurrent cache internally. Concurrent calls can result in an . If you need to use from multiple threads, create a separate instance for each thread or use external synchronization. + This type is not thread safe. The methods can't be called concurrently from multiple threads, as they use a non-concurrent cache internally. Concurrent calls can result in an . If you need to use from multiple threads, use external synchronization. @@ -76,7 +76,7 @@ The event for which to populate nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - This method is not thread-safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . + This method is not thread safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . is . @@ -107,7 +107,7 @@ The field for which to populate the nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - This method is not thread-safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . + This method is not thread safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . is . @@ -138,7 +138,7 @@ The parameter for which to populate the nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - This method is not thread-safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . + This method is not thread safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . is . @@ -169,7 +169,7 @@ The property for which to populate the nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - This method is not thread-safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . + This method is not thread safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . is . From 14fc0d7ee21672ca3473aa2a892f5b85dfe0119d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 17:59:31 +0000 Subject: [PATCH 5/6] Remove thread-safety remarks from individual methods Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- xml/System.Reflection/NullabilityInfoContext.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xml/System.Reflection/NullabilityInfoContext.xml b/xml/System.Reflection/NullabilityInfoContext.xml index 753271049b5..fddd9a361b6 100644 --- a/xml/System.Reflection/NullabilityInfoContext.xml +++ b/xml/System.Reflection/NullabilityInfoContext.xml @@ -76,7 +76,7 @@ The event for which to populate nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - This method is not thread safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . + To be added. is . @@ -107,7 +107,7 @@ The field for which to populate the nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - This method is not thread safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . + To be added. is . @@ -138,7 +138,7 @@ The parameter for which to populate the nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - This method is not thread safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . + To be added. is . @@ -169,7 +169,7 @@ The property for which to populate the nullability information. Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. - This method is not thread safe. Don't call it concurrently from multiple threads, as it uses a non-concurrent cache internally. Concurrent calls can result in an . + To be added. is . From 961c4b6035f7bb877dfd24df65d84fca8e21d625 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 22:17:42 +0000 Subject: [PATCH 6/6] Add threadsafe sections to Create methods Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- xml/System.Reflection/NullabilityInfoContext.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xml/System.Reflection/NullabilityInfoContext.xml b/xml/System.Reflection/NullabilityInfoContext.xml index fddd9a361b6..03d05b526bd 100644 --- a/xml/System.Reflection/NullabilityInfoContext.xml +++ b/xml/System.Reflection/NullabilityInfoContext.xml @@ -77,6 +77,7 @@ Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. To be added. + This method is not thread safe. is . @@ -108,6 +109,7 @@ Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. To be added. + This method is not thread safe. is . @@ -139,6 +141,7 @@ Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. To be added. + This method is not thread safe. is . @@ -170,6 +173,7 @@ Populates a for the given . If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the state. A instance. To be added. + This method is not thread safe. is .