Skip to content

[fix-finder] Remove null-forgiving operator from activity names - #12831

Merged
simonrozsival merged 2 commits into
mainfrom
nightly/remove-manifest-null-forgiving-886d293866850b74
Sep 21, 2026
Merged

simonrozsival merged 2 commits into
mainfrom
nightly/remove-manifest-null-forgiving-886d293866850b74

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

AI-generated fix. Produced by the nightly-fix-finder agentic workflow.

Problem

AndroidAppManifest.GetLaunchableActivityNames() used the postfix null-forgiving operator to convert filtered nullable XML attribute values to activity names. This violated the repository rule against null-forgiving operators and relied on nullable flow analysis suppression.

Fix

Use OfType<string>() immediately after reading nullable activity name attributes. This removes null values before applying the existing predicates and preserves the returned names and filtering behavior without a null-forgiving operator.

Validation

Passed:

  • AndroidSdkDirectory="$GITHUB_WORKSPACE/bin/Debug/android-sdk" AndroidNdkDirectory="$GITHUB_WORKSPACE/bin/Debug/android-ndk" ./build.sh Prepare
  • ./dotnet-local.sh test tests/Xamarin.Android.Tools.AndroidSdk-Tests/Xamarin.Android.Tools.AndroidSdk-Tests.csproj -p:AndroidToolsDisableMultiTargeting=false -p:DotNetTargetFrameworkVersion=10.0 --no-restore
  • git diff --check origin/main

Fix-finder metadata

  • Script: 02-null-forgiving-operator
  • Score: 30/30 (actionability: 10, safety: 10, scope: 10)

Generated by Nightly Fix Finder · copilot · gpt56 · 74.8 AIC · ⌖ 26.3 AIC · ⊞ 19.9K ·

github-actions Bot and others added 2 commits September 19, 2026 01:59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@simonrozsival
simonrozsival merged commit 1c3301c into main Sep 21, 2026
44 checks passed
@simonrozsival
simonrozsival deleted the nightly/remove-manifest-null-forgiving-886d293866850b74 branch September 21, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant