[src] Fix a few nullablity issues in a few places.#25043
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a handful of nullable-reference-type correctness issues across the bindings and tests, primarily by making APIs accept null where the underlying native APIs already do, and by adjusting tests/call sites accordingly.
Changes:
- Add a regression test for
CIFilter.FilterNamesInCategoriesbehavior withnullvs no-argument calls. - Update CoreImage filter introspection tests to call
FilterNamesInCategories()without explicitly passingnull. - Make a few public APIs nullable where appropriate (
NetworkReachabilityaddress-pair ctor,SecPolicy.CreateSslPolicyhost name,CIFilter.FilterNamesInCategoriesparams array).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/monotouch-test/CoreImage/FilterTest.cs | Adds a test validating FilterNamesInCategories() vs FilterNamesInCategories(null) behavior. |
| tests/introspection/ApiCoreImageFiltersTest.cs | Switches filter enumeration to FilterNamesInCategories() calls. |
| src/SystemConfiguration/NetworkReachability.cs | Updates the address-pair constructor and helper to accept nullable IPAddress values. |
| src/Security/Policy.cs | Makes CreateSslPolicy accept a nullable host name and tidies XML docs. |
| src/CoreImage/CIFilter.cs | Updates FilterNamesInCategories signature to accept a nullable params array. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
✅ [CI Build #080a190] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #080a190] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #080a190] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #080a190] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 156 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. [attempt 5] Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
No description provided.