java6 compiler gives error here.. Cannot cast Object to boolean..