fix: handle null check for empty data in Message decoding logic#1168
fix: handle null check for empty data in Message decoding logic#1168
data in Message decoding logic#1168Conversation
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 |
Resolves #1167
Bug only shown in the log, but still annoying
Summary by CodeRabbit