make sure code actually compiles against JRuby 1.7.x (as well as 1.6.8)
internal cleanup - avoid Utils.checkKind calls as in places used an instanceof check is fine