Skip to content

fix: Propagate null values in Wrap* methods - #982

Merged
mergify[bot] merged 1 commit into
TestableIO:mainfrom
zivarah:propagate-null-in-wrappers
May 4, 2023
Merged

fix: Propagate null values in Wrap* methods#982
mergify[bot] merged 1 commit into
TestableIO:mainfrom
zivarah:propagate-null-in-wrappers

Conversation

@zivarah

Copy link
Copy Markdown
Contributor

When wrapping FileSystemInfo, DirectoryInfo, and FileInfo, null inputs will be correctly propagated.
Prior to this change, the wrappers for all three of these types would throw exceptions:

  • NullReferenceException for WrapFileSystemInfo
  • ArgumentNullException for WrapDirectoryInfo/WrapFileInfo (thrown by DirectoryInfoWrapper/FileInfoWrapper)

Basic unit tests were also added for these null cases.

Fixes#981

@zivarahzivarah changed the title Propagate null values in Wrap* methodsfix: Propagate null values in Wrap* methodsMay 4, 2023
@zivarah
zivarahforce-pushed the propagate-null-in-wrappers branch from 3801795 to c6c2907CompareMay 4, 2023 08:25

@fgreinacherfgreinacher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@mergify
mergifyBot merged commit 04abe02 into TestableIO:mainMay 4, 2023
@zivarah
zivarah deleted the propagate-null-in-wrappers branch May 4, 2023 19:06
vbreuss referenced this pull request in Testably/Testably.Abstractions May 5, 2023
…19.2.22 (#303)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
|
[TestableIO.System.IO.Abstractions](https://togithub.com/TestableIO/System.IO.Abstractions)
| nuget | patch | `19.2.18` -> `19.2.22` |
---
### Release Notes
<details>
<summary>TestableIO/System.IO.Abstractions</summary>
###
[`v19.2.22`](https://togithub.com/TestableIO/System.IO.Abstractions/releases/tag/v19.2.22)
#### What's Changed
- chore(deps): update dependency githubactionstestlogger to v2.0.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/TestableIO/System.IO.Abstractions/pull/978](https://togithub.com/TestableIO/System.IO.Abstractions/pull/978)
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.1.20 by [@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/TestableIO/System.IO.Abstractions/pull/979](https://togithub.com/TestableIO/System.IO.Abstractions/pull/979)
- chore(deps): update dependency nerdbank.gitversioning to v3.6.128 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/TestableIO/System.IO.Abstractions/pull/980](https://togithub.com/TestableIO/System.IO.Abstractions/pull/980)
- fix: Propagate null values in Wrap\* methods by
[@&#8203;zivarah](https://togithub.com/zivarah) in
[https://github.com/TestableIO/System.IO.Abstractions/pull/982](https://togithub.com/TestableIO/System.IO.Abstractions/pull/982)
#### New Contributors
- [@&#8203;zivarah](https://togithub.com/zivarah) made their first
contribution in
[https://github.com/TestableIO/System.IO.Abstractions/pull/982](https://togithub.com/TestableIO/System.IO.Abstractions/pull/982)
**Full Changelog**:
TestableIO/System.IO.Abstractions@v19.2.18...v19.2.22
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/Testably/Testably.Abstractions).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS43MS4wIiwidXBkYXRlZEluVmVyIjoiMzUuNzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

This is addressed in release v19.2.22.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: releasedIssues that are released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IFileSystemInfo.ResolveLinkTarget throws exception instead of returning null if the path is not a link

2 participants

@zivarah@fgreinacher