Fix NPE when built statements without parameters are logged at TRACE level

Description

See full description here.

The following kind of BuiltStatement (without bound variables) will cause an NPE if the log level permits query parameters to be printed (that is, TRACE):

What's even worse, the NPE bubbles up and the connection hangs. I suggest that we also catch errors thrown from com.datastax.driver.core.LatencyTracker#update.

Environment

None

Pull Requests

None
Fixed

Assignee

Alexandre Dutra

Reporter

Alexandre Dutra

Labels

None

PM Priority

None

Reproduced in

None

Affects versions

None

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Major
Configure