Apparently mongodb 2.2.0 changed the type of "capped" property returned by getStats() method for collections from integer to boolean.
As a result an attempt to invoke DBCollection.isCapped() on capped collection when working with mongodb version 2.2.0 leads to ClassCastException.
I have attached the test that demonstrates the problem. The test will happily run with mongodb versions 2.0.x and below but fail with 2.2.0.
The source also provides an alternative implementation of isCapped() that fixes the problem.