datastax/java-driver — pull request #107 by mebigfatguy (2013-06-27 02:04:25+00:00)
Title: Allow bind parameters for counter increments to be integers

if you create a prepared statement such as

update foo set mycounter = mycounter + ? where mykey = ?

you can then execute it such as

myUpdatePS.bind(1, 'fookey');

This compiles fine, as int autoboxes to Object.

However, counter parms must be Longs, so this produces runtime exceptions.

Embellished BoundStatement.bind for counters such that if an Integer is provided, convert to Long.