lombok-intellij-plugin icon indicating copy to clipboard operation
lombok-intellij-plugin copied to clipboard

Return @NotNull annotation after code auto-completion

Open 15klli opened this issue 4 years ago • 1 comments

Short description

when I input dto.getId() and click ctrl+alt+v, the code beteween @NotNull Integer id = dto.getId()

@Data
public class Dto{
@NotNull
private Integer id;
}

Expected behavior

I don't need @NotNull at the beginning of the statement.

Version information

  • IDEA Version: IntelliJ IDEA 2019.1.3 (Ultimate Edition)
  • JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  • JDK Version: jre 1.8.0_202-release-1483-b58 amd64
  • OS Type & Version: Windows 10 10.0
  • Lombok Plugin Version: v029-2019.1
  • Lombok Dependency Version: 1.16.10

Simple Demo

@Data
public class TestDto {

    @NotNull(message = "d")
    private String hhh;

    @NotNull
    private String h;

    public static void main(String[] args) {
        @NotNull String h = new TestDto().getH();
    }
}

15klli avatar Jun 18 '20 13:06 15klli

@15klli Lombok doesn't have annotation "NotNull" only "NonNull". Why do you think that that completion is the result of Lombok plugin?

Lekanich avatar Oct 03 '20 10:10 Lekanich