-
Notifications
You must be signed in to change notification settings - Fork 41
fix: handle null check for empty data in Message decoding logic
#1168
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
WalkthroughAdjusted conditional handling in BaseMessage to avoid throwing when lastPayload is null during data decoding. Previously, a non-String/byte[] payload triggered an exception unconditionally; now the exception is thrown only if lastPayload is non-null. Minor formatting tweak in an if condition. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant BaseMessage
Client->>BaseMessage: decode(data)
alt data is String or byte[]
BaseMessage-->>Client: proceed with decoded payload
else data is null
Note right of BaseMessage: No exception thrown (new behavior)
BaseMessage-->>Client: proceed without payload
else data is other type
BaseMessage-->>Client: throw decoding exception
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
🔇 Additional comments (1)
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. Comment |
sacOO7
left a comment
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.
Lgtm
Resolves #1167
Bug only shown in the log, but still annoying
Summary by CodeRabbit