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] STS4 4.22.0 + Lombok 1.18.32 + JDK22 java.lang.NoSuchMethodError #3638

Open
sergey-morenets opened this issue Mar 23, 2024 · 2 comments · May be fixed by #3633
Open

[BUG] STS4 4.22.0 + Lombok 1.18.32 + JDK22 java.lang.NoSuchMethodError #3638

sergey-morenets opened this issue Mar 23, 2024 · 2 comments · May be fixed by #3633

Comments

@sergey-morenets
Copy link

Describe the bug

When I tried to migrate from STS 4.21 to STS 4.22 I got an error in STS UI and the stacktrace in the log:

java.lang.NoSuchMethodError: 'void org.eclipse.jdt.internal.compiler.ast.CaseStatement.<init>(org.eclipse.jdt.internal.compiler.ast.Expression, int, int)'
	at lombok.eclipse.Eclipse.createCaseStatement(Eclipse.java:285)
	at lombok.eclipse.handlers.singulars.EclipseJavaUtilListSingularizer.appendBuildCode(EclipseJavaUtilListSingularizer.java:75)
	at lombok.eclipse.handlers.HandleBuilder.generateBuildMethod(HandleBuilder.java:821)
	at lombok.eclipse.handlers.HandleBuilder.handle(HandleBuilder.java:563)
	at lombok.eclipse.HandlerLibrary$AnnotationHandlerContainer.handle(HandlerLibrary.java:106)
	at lombok.eclipse.HandlerLibrary.handleAnnotation(HandlerLibrary.java:237)
	at lombok.eclipse.TransformEclipseAST$AnnotationVisitor.visitAnnotationOnType(TransformEclipseAST.java:269)

I look into the code and it seems that CaseStatement class from Eclipse JDT doesn't have constructor that accepts Expression/int/int.
It was changed 3 weeks ago:

public CaseStatement(Expression[] constantExpressions, int sourceStart, int sourceEnd) {
	this.constantExpressions = constantExpressions;
	this.sourceStart = sourceStart;
	this.sourceEnd = sourceEnd;
}

To Reproduce

Open any workspace project in STS 4.22.0.

Expected behavior

No error should occur

Version info (please complete the following information):

  • Lombok 1.18.32
  • STS 4.22.0
  • JDK 22.0.0
@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.

@Rawi01 Rawi01 linked a pull request Mar 24, 2024 that will close this issue
@sergey-morenets
Copy link
Author

Hi @Rawi01

Thank you for the quick response. Does edge version contain this fix? When will it be released as stable version?

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