Can't connect to clusters built from source because version parsing doesn't handle 'x.y-SNAPSHOT'

Description

If you build cassandra from source (i.e. trunk, cassandra-2.1) a version number such as 4.0-SNAPSHOT will be reported in the release_version column in the system.peers and system.local table.

Since 3.18.0, the driver is currently not able to handle this:

This occurs when the version in both the x.y-SNAPSHOT (4.0-SNAPSHOT) and x.y.z-SNAPSHOT (2.1.21-SNAPSHOT) formats.

Resolution
The Version parsing has been improved to support a pre release part like '-SNAPSHOT'.

Environment

None

Pull Requests

None

Status

Assignee

Unassigned

Reporter

Andy Tolbert

Fix versions

Labels

None

Reproduced in

None

PM Priority

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Affects versions

Priority

Critical
Configure