Compiler doesn't recognize Lombok Getter for overriden method

Assuming we have an interface TestInterface in an external artifact, that we cannot change:

public interface TestInterface {

Boolean isTest();

//more getter and setter methods

}

and an implementation of this interface, with more members corresponding to the parent interface. Lombok's annotations @Getter / @Setter are not recognized by the compiler, so I must add the actual getter method to make the following class compilable.

@Getter

@Setter

public class TestImplementation implements TestInterface {

Boolean test;

//more members

}

The compilation error shown by IntelliJ IDEA is the standard error you get when a method of the interface is not implemented:

my.package.TestImplementation is not...

Read More »

By: StackOverFlow - Thursday, 8 November

Related Posts