Skip to content

Conversation

@zivarah
Copy link
Contributor

@zivarah zivarah commented May 4, 2023

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

@zivarah zivarah changed the title Propagate null values in Wrap* methods fix: Propagate null values in Wrap* methods May 4, 2023
@zivarah zivarah force-pushed the propagate-null-in-wrappers branch from 3801795 to c6c2907 Compare May 4, 2023 08:25
Copy link
Contributor

@fgreinacher fgreinacher left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@mergify mergify bot merged commit 04abe02 into TestableIO:main May 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

This is addressed in release v19.2.22.

@github-actions github-actions bot added the state: released Issues that are released label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: released Issues 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