Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gbhambale5143 opened this issue Apr 24, 2024 · 3 comments

Comments

@gbhambale5143
Copy link

gbhambale5143 commented Apr 24, 2024

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;

}
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 24, 2024
@scottfrederick
Copy link
Contributor

Thanks for the report. It's not clear what role Spring Boot might have in this problem, but it's hard to tell from the snippets you've provided. If you would like us to spend some time investigating, please provide a complete minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it and attaching it to this issue.

@scottfrederick scottfrederick added the status: waiting-for-feedback We need additional information before we can continue label Apr 24, 2024
@spring-projects-issues
Copy link
Collaborator

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label May 1, 2024
@spring-projects-issues
Copy link
Collaborator

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2024
@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants