Skip to content

Migrating from SpringBoot 2.7.1 to 3.2.3 but Lombok @SuperBuilder is not working getting error: cannot find symbol #40502

@gbhambale5143

Description

@gbhambale5143

Hi Team,
I am migrating from SpringBoot 2.7.1 to 3.2.3 but Lombok @SuperBuilder is not working getting below error.

cannot find symbol.
private void fillInUserReportFields(UserReport.**UserReportBuilder**<?,?> builder,
  symbol:   class UserReportBuilder
  location: class UserReport

I was using lombok 1.18.30 version.

Also tried with below versions as well
1.18.32, 1.18.28, 1.18.22, 1.18.26

Please find the code below:

@Setter @Getter  @SuperBuilder @EqualsAndHashCode(callSuper = false)
@JsonPropertyOrder({"userId", "location" })
public class **UserReport** extends MessageBase
{

  @JsonProperty(value = "userId", required = true)
  private Integer      userId;
  
  @JsonProperty(value = "location", required = true)
  private String       location;
 


  public UserReport (String userId, String location)
  {
    this.userId = Optional.ofNullable(userId).orElse(-1);
    this.location = Optional.of(location).filter(StringUtils::isNotBlank).orElse(null);
  }

	
}
@Service
public class **MessageService**
{

             //method
  private void fillInUserReportFields(**UserReport.UserReportBuilder**<?,?> builder,
                                         UserEvent event)
  {
   
   //body
   
}
@Data
@SuperBuilder @JsonPropertyOrder({ "messageType", "messageNumber"})
public class MessageBase
{
  private static final Logger LOGGER = LogManager.getLogger();

  @NotNull @NotBlank
  private String messageType;
  @NotNull @NotBlank
  private int messageNumber;
  private Integer requestNumber;

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions