-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Handle case where IPostDataElement.Bytes is null #5120
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
Conversation
WalkthroughA null check was added to the Changes
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
CefSharp/PostDataExtensions.cs (1)
73-81
: XML summary now slightly outdated – mention thenull
return caseThe
<returns>
section still states “encoded string” but the method can now (and previously could) returnnull
for both empty andnull
byte arrays. A tiny doc tweak prevents confusion for consumers relying on IntelliSense.- /// <returns>encoded string</returns> + /// <returns> + /// The decoded string, or <c>null</c> if <see cref="IPostDataElement.Bytes"/> is + /// <c>null</c> or empty. + /// </returns>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
CefSharp/PostDataExtensions.cs
(1 hunks)
🔇 Additional comments (1)
CefSharp/PostDataExtensions.cs (1)
84-87
: Fixed potentialNullReferenceException
; implementation looks goodEarly-returning when
bytes
isnull
closes the loophole that previously led to an NRE and keeps the behaviour consistent with the empty-array case. Nice, minimal patch!
✅ Build CefSharp 137.0.100-CI5270 completed (commit 052ebdceb9 by @Matheos96) |
Docstrings generation was requested by @amaitland. * #5120 (comment) The following files were modified: * `CefSharp/PostDataExtensions.cs`
Note Generated docstrings for this pull request at #5121 |
Nice one! Thanks |
Summary: [summary of the change and which issue is fixed here]
Changes: [specify the structures changed]
How Has This Been Tested?
By calling .GetBody() on a IPostDataElement object with PostDataType.Empty and Bytes = null.
Types of changes
Checklist: