Skip to content

Conversation

JeremyKuhne
Copy link
Member

@JeremyKuhne JeremyKuhne commented Feb 25, 2025

Where we construct DataObject's directly or indirectly we should always throw for null data. This is to be more consistent with our APIs and also with WPF.

Simplify test names in ClipboardTests for easier navigation.

Microsoft Reviewers: Open in CodeFlow

Where we construct DataObject's directly or indirectly we should always throw for null data. This is to be more consistent with our APIs and also with WPF.

Simplify test names in ClipboardTests for easier navigation.
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.93729%. Comparing base (8985769) to head (0278201).
Report is 1 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                  @@
##                main      #13023          +/-   ##
====================================================
+ Coverage   76.05439%   96.93729%   +20.88290%     
====================================================
  Files           3270        1221        -2049     
  Lines         643550      356971      -286579     
  Branches       47430        5529       -41901     
====================================================
- Hits          489448      346038      -143410     
+ Misses        150532       10092      -140440     
+ Partials        3570         841        -2729     
Flag Coverage Δ
Debug 96.93729% <100.00000%> (+20.88290%) ⬆️
integration ?
production ?
test 96.93729% <100.00000%> (+0.00003%) ⬆️
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

@Tanya-Solyanik Tanya-Solyanik added the 📖 documentation: breaking please open a breaking change issue https://github.com/dotnet/docs/issues/new?assignees=gewarren label Feb 25, 2025
@JeremyKuhne JeremyKuhne merged commit 5a029b5 into dotnet:main Feb 25, 2025
8 checks passed
@JeremyKuhne JeremyKuhne deleted the nulldatathrow branch February 25, 2025 20:46
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0 Preview3 milestone Feb 25, 2025
@Olina-Zhang
Copy link
Member

Tested in the latest .NET 10 SDK build: 10.0.100-preview.3.25126.20 + dlls built from main branch of Winforms repo, now System.ArgumentNullException throws if setting null data by Clipboard.SetData() method:
image

LeafShi1 pushed a commit to LeafShi1/winforms that referenced this pull request Mar 6, 2025
Where we construct DataObject's directly or indirectly we should always throw for null data. This is to be more consistent with our APIs and also with WPF.

Simplify test names in ClipboardTests for easier navigation.
@John-Qiao
Copy link
Contributor

John-Qiao commented Mar 26, 2025

Verified with .NET 10.0.100-preview.3.25174.5 test pass build; the result is same as above test result.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📖 documentation: breaking please open a breaking change issue https://github.com/dotnet/docs/issues/new?assignees=gewarren
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants