apache / apache/rocketmq-client-go

Panic in SendResult.String() when MessageQueue is nil

Open
#1,124 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.4k
Forks
445
PR merge metrics
No merged PRs in 30d

Description

**BUG REPORT**
1. Please describe the issue you observed:

- What did you do (The steps to reproduce)?
The `String()` method in `SendResult` cause a panic when `MessageQueue` field is `nil`. This happens beacuse `String()` method tries to access `MessageQueue.String()` without checking if `MessageQueue` is `nil`.

- What did you expect to see?
The String() method should not panic, even when MessageQueue is nil. Instead, it should return a string that clearly indicates MessageQueue is nil.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.