IntellJ IDEA 12.1 Throwing error on valid code