Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FilePicker PickMultipleAsync nullable reference type #27710

Open
aalsamoht opened this issue Feb 11, 2025 · 0 comments
Open

FilePicker PickMultipleAsync nullable reference type #27710

aalsamoht opened this issue Feb 11, 2025 · 0 comments
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info essentials-file-picker partner/syncfusion Issues / PR's with Syncfusion collaboration t/bug Something isn't working

Comments

@aalsamoht
Copy link

Description

FilePicker.PickMultipleAsync() can return null.
The documentation is correct, but the nullable reference type annotation for the return value is wrong.

https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.storage.filepicker.pickmultipleasync?view=net-maui-9.0#microsoft-maui-storage-filepicker-pickmultipleasync(microsoft-maui-storage-pickoptions)

Steps to Reproduce

var fileResults = await filePicker.PickMultipleAsync(PickOptions.Default);

// Warning: Expression is always true according to nullable reference types' annotations
if (fileResults is not null)
{
   // Some code
}

Link to public reproduction project repository

No response

Version with bug

8.0.100 SR10

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

iOS, Android, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

@aalsamoht aalsamoht added the t/bug Something isn't working label Feb 11, 2025
@PureWeen PureWeen added essentials-file-picker area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info labels Feb 11, 2025
@PureWeen PureWeen added this to the .NET 10 Planning milestone Feb 11, 2025
@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info essentials-file-picker partner/syncfusion Issues / PR's with Syncfusion collaboration t/bug Something isn't working
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

3 participants