[
https://issues.apache.org/jira/browse/BOOKKEEPER-599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13623851#comment-13623851
]
Sijie Guo commented on BOOKKEEPER-599:
--------------------------------------
looks good. but since handleResponse is in critical path, could we still put
the debug statement under if statement? although {} does magic things, it still
evaluates the parameters.
> NPE in PerChannelBookieClient
> -----------------------------
>
> Key: BOOKKEEPER-599
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-599
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.2.0, 4.2.1
> Reporter: Jiannan Wang
> Assignee: Jiannan Wang
> Fix For: 4.3.0
>
> Attachments: BOOKKEEPER-599.patch
>
>
> When log level is DEBUG, a failure read will cause NPE in
> PerChannelBookieClient (rr.getData() is null):
> {code:java}
> void handleReadResponse(BookieProtocol.ReadResponse rr) {
> if (LOG.isDebugEnabled()) {
> LOG.debug("Got response for read request {} entry length: {}",
> rr, rr.getData().readableBytes());
> }
> ...
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira