Skip to content

Problems with lombok annotations #1208

Closed as not planned
Closed as not planned

Description

@explorer566

Problem
Lombok annotations with values don't get processed. This happens in STS 4.22.0 and was working in previous versions.

Working example

 import java.io.Serializable;
 import java.time.LocalDate;
 import lombok.EqualsAndHashCode;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.ToString;

    @Getter
@Setter
@EqualsAndHashCode()
@ToString()
public class Test implements Serializable {

	private String myString;

	private LocalDate myDate;
}

Generates getter, setter, equals, hashCode und toString methods.

Non working example

 import java.io.Serializable;
 import java.time.LocalDate;
 import lombok.EqualsAndHashCode;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.ToString;

@Getter
@Setter
@EqualsAndHashCode(of = { "myString", "myDate" })
@ToString(doNotUseGetters = true)
public class Test implements Serializable {

	private String myString;

	private LocalDate myDate;
}

Generates only getter and setter methods.

Activity

  1. explorer566 commented on Mar 16, 2024

    @explorer566
    Author

    I am using STS 4.22.0 under Windows and Lombok 1.18.30

  2. added
    for: eclipse
    and removed on Mar 16, 2024
  3. martinlippert commented on Mar 16, 2024

    @martinlippert
    Member

    This is probably a duplicate of projectlombok/lombok#3630, therefore closing this one here. Looks like the Lombok support for Eclipse is not yet compatible with the latest Eclipse 2024-03 release, which is the base for the latest Spring Tools 4.22.0 release.

  4. martinlippert commented on Mar 16, 2024

    @martinlippert
    Member
  5. martinlippert commented on Mar 17, 2024

    @martinlippert
    Member

    According to projectlombok/lombok#3630 (comment), this is fixed in the latest Lombok Edge release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: eclipsestatus: duplicatetype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions