Search code examples
javamavenintellij-ideamethodshighlight

Java loads the method, but Maven can't see it


IntelliJ highlights the getFirstName method as it is wrong. However, everything works and compiles. What can I do to make Maven see this method as well?

highlight

class


Solution

  • If everything works and compiles it might not be from Maven. Sometimes IntelliJ gets confused. If you haven't done this I'd suggest you to File | Invalidate Caches/Restart

    Hope it helps.

    Edit : As Petr Aleksandrov commented, you can check the Jidea Annotation processor : Configuring Annotation Processing