Search code examples
javaintellij-idealombokintellij-lombok-plugin

Ambiguous method call using Project Lombok


I have the following code:

import lombok.Builder;
import lombok.Getter;

@Getter
@Builder
public class NameParserResponse {
    private boolean match;
}


public class Main {

    public static void main(String[] args) {
        NameParserResponse nameParserResponse = NameParserResponse.builder().build();
        nameParserResponse.isMatch();
    }
}

When trying to reference isMatch(), I get:

Ambiguous method call. Both

isMatch () in Response and
isMatch () in Response match

enter image description here

I have also tried removing the @Builder annotation, but this doesn't help.


Solution

  • It looks like I had the Hrisey Intellij plugin installed in addition to the Project Lombok plugin. I must have accidentally installed this when I was looking for the Project Lombok plugin.

    After disabling this plugin, the issue was no longer present.