googleapis / googleapis/google-cloud-java

Exceptions created by FlowController don't provide getMessage method implementations

Đang mở
#12,950 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
priority: p3 type: bug
Ngôn ngữ chính
Java
Star
2.1k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
154

Mô tả

Standard Java convention for exception messages is:

- getMessage() → returns the raw detail message
- toString() → returns ClassName: getMessage()

FlowController creates exceptions without implementing getMessage() or calling super(msg) in its constructors. Consequently, getMessage() returns null.

When logging framework uses getMessage() to render the output you will get very limited text representation.
For example:

```
com.google.api.gax.batching.FlowController$MaxOutstandingRequestBytesReachedException: null
at com.google.cloud.pubsub.v1.Publisher$MessageFlowController.acquire(Publisher.java:1019)
at com.google.cloud.pubsub.v1.Publisher.publish(Publisher.java:297)
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.