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

[BUG] Lombok fail when using @Singular annotation #3635

Closed
eitan-rosenberg opened this issue Mar 20, 2024 · 3 comments · Fixed by #3633
Closed

[BUG] Lombok fail when using @Singular annotation #3635

eitan-rosenberg opened this issue Mar 20, 2024 · 3 comments · Fixed by #3633

Comments

@eitan-rosenberg
Copy link

eitan-rosenberg commented Mar 20, 2024

I install Eclipse 2024-03 (4.31) and today I install Lombok v1.18.32 "Envious Ferret".

The project is Maven and use:

<dependency>
	<groupId>org.projectlombok</groupId>
	<artifactId>lombok</artifactId>
	<version>1.18.32</version>
</dependency>

There is a problem when using the Singular annotation.

This is the class that used to work just fine:

package myTestClasses;

import java.math.BigDecimal;
import java.time.YearMonth;
import java.util.Map;

import lombok.Builder;
import lombok.Data;
import lombok.Singular;

@Data
@Builder
public class MySeries {

	@Data
	@Builder
	public static class MyObsValue {

		private final BigDecimal obsValue;
		private final YearMonth timePeriod;

	}

	private final String currencySource;
	private final String currencyTarget;

	@Singular(value = "putMyObsValue")
	private final Map<YearMonth, MyObsValue> myObsValues;

	private final Double unitMultiplier;

}

I am getting:

  • Lombok annotation handler class lombok.eclipse.handlers.HandleBuilder failed - See error log.
  • The method builder() is undefined for the type MySeries.

Help...

Here is the log:
.log

@Rawi01 Rawi01 linked a pull request Mar 24, 2024 that will close this issue
@Rawi01
Copy link
Collaborator

Rawi01 commented Mar 24, 2024

The eclipse team merged these changes to the Java 22 support plugin, we didn't anticipated that and released the latest lombok version without the fix for it to not further delay it. You can find a build with the fix here.

@eitan-rosenberg
Copy link
Author

Thanks,

Seems to solve the problem.

When it will be on Maven ?

@eitan-rosenberg
Copy link
Author

Version 1.18.32 that reside in maven is not working when using "Singular" annotation.
I test this today.
Had to use the jar from here:
https://github.com/projectlombok/lombok/actions/runs/8350007437

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

Successfully merging a pull request may close this issue.

2 participants