I have the following dynamic salience: salience ( -10000 / (c.size * t.size) ) which throws a ClassCastException when it is not a whole division. In my case I dont really care about the decimals. Any ideas? thanks.