I have the problem mentioned in the title. You could say that this thread duplicates another one: How do I turn off error validation for annotations in IntelliJ IDEA?
Bu
There's also a language level for every module. Please check your module settings in the Project Structure.