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

Improve null handling in AccessSessionUpdater.cs #8

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

FrodeHus
Copy link
Owner

Improve null handling in AccessSessionUpdater.cs

Replaced null-forgiving operator with null-coalescing operator
in the BeyondTrustConnector namespace. This change ensures
that a default value of "Unknown" is assigned to user details
if XML elements are missing or null, enhancing code robustness.

PR Classification

Code cleanup to improve robustness by handling potential null values.

PR Summary

Replaced null-forgiving operator with null-coalescing operator to ensure default values are assigned for missing or null XML elements.

  • AccessSessionUpdater.cs: Updated handling of "username", "public_ip", "private_ip", and "os" elements to use "Unknown" as default if null.

Replaced null-forgiving operator with null-coalescing operator
in the BeyondTrustConnector namespace. This change ensures
that a default value of "Unknown" is assigned to user details
if XML elements are missing or null, enhancing code robustness.
@FrodeHus FrodeHus merged commit 0eb49fe into main Dec 18, 2024
2 checks passed
@FrodeHus FrodeHus deleted the fix/nre-on-getuserdetails branch December 18, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant