Skip to content

Commit 1af7382

Browse files
committed
Remove incorrect assertion
It's legal for a client to not supply a specific version, e.g. not call Cluster.Builder::withProtocolVersion, in which case factory.protocolVersion is null. While v5 was marked beta this wasn't a problem as Cluster.Builder::allowProtocolVersion was required, but now this causes an NPE in the driver.
1 parent 18ef455 commit 1af7382

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

driver-core/src/main/java/com/datastax/driver/core/Connection.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,6 @@ private Message.ProtocolEncoder messageEncoderFor(ProtocolVersion version) {
17731773
* v5.
17741774
*/
17751775
void switchToV5Framing() {
1776-
assert factory.protocolVersion.compareTo(ProtocolVersion.V5) >= 0;
17771776
// We want to do this on the event loop, to make sure it doesn't race with incoming requests
17781777
assert channel.eventLoop().inEventLoop();
17791778

0 commit comments

Comments
 (0)