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

Fix Eclipse-I tests #3633

Merged
merged 2 commits into from
May 14, 2024
Merged

Conversation

Rawi01
Copy link
Collaborator

@Rawi01 Rawi01 commented Mar 19, 2024

This PR fixes the two broken test steps

  • The normal test failed because the old constructor of CaseStatement doesn't exists anymore. I also reworked the code a little bit to use static final fields.
  • The integration test failed because the referenced class CodeStyleCleanUp was renamed to CodeStyleCleanUpCore.

@andi-huber
Copy link

I'm using Eclipse 2024-03 (4.31) with Eclipse Marketplace solution Java 22 support for Eclipse 2024-03 (4.31) installed.

As far as I can tell, this patch works great for me, thanks!

@rzwitserloot
Copy link
Collaborator

Current [edge] is available with this patch included if you need it now. We'll try to get a new release out with it asap.

@diegovilar
Copy link

Even with this build (downloaded from runs/8350007437), I'm still getting the error in Java 17:

[Error - 11:13:32 AM] May 16, 2024, 11:13:32 AM Lombok annotation handler class lombok.eclipse.handlers.HandleBuilder failed
'void org.eclipse.jdt.internal.compiler.ast.CaseStatement.<init>(org.eclipse.jdt.internal.compiler.ast.Expression, int, int)'
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.visitAnnotationOnMethod(TransformEclipseAST.java:264)
	at lombok.eclipse.EclipseNode.traverse(EclipseNode.java:113)
	at lombok.eclipse.EclipseAST.traverseChildren(EclipseAST.java:231)
	at lombok.eclipse.EclipseNode.traverse(EclipseNode.java:90)
	at lombok.eclipse.EclipseAST.traverseChildren(EclipseAST.java:231)
	at lombok.eclipse.EclipseNode.traverse(EclipseNode.java:74)
	at lombok.eclipse.EclipseAST.traverseChildren(EclipseAST.java:231)
	at lombok.eclipse.EclipseNode.traverse(EclipseNode.java:69)
	at lombok.eclipse.EclipseAST.traverse(EclipseAST.java:224)
	at lombok.eclipse.TransformEclipseAST.go(TransformEclipseAST.java:226)
	at lombok.eclipse.TransformEclipseAST.transform(TransformEclipseAST.java:187)
	at lombok.eclipse.TransformEclipseAST.transform_swapped(TransformEclipseAST.java:104)
	at jdk.internal.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at lombok.launch.PatchFixesHider$Util.invokeMethod(PatchFixesHider.java:146)
	at lombok.launch.PatchFixesHider$Transform.transform_swapped(PatchFixesHider.java:272)
	at org.eclipse.jdt.internal.compiler.parser.Parser.endParse(Parser.java:11535)
	at org.eclipse.jdt.internal.core.util.CommentRecorderParser.endParse(CommentRecorderParser.java:131)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12735)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12965)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12922)
	at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:11306)
	at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:850)
	at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:393)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1256)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:791)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateASTCached(ASTParser.java:1243)
	at org.eclipse.jdt.core.dom.ASTParser.lambda$0(ASTParser.java:1121)
	at org.eclipse.jdt.internal.core.JavaModelManager.cacheZipFiles(JavaModelManager.java:5766)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1121)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:869)
	at org.eclipse.jdt.internal.corext.refactoring.util.RefactoringASTParser.parse(RefactoringASTParser.java:65)
	at org.eclipse.jdt.internal.corext.refactoring.structure.CompilationUnitRewrite.getRoot(CompilationUnitRewrite.java:336)
	at org.eclipse.jdt.internal.corext.refactoring.structure.CompilationUnitRewrite.getASTRewrite(CompilationUnitRewrite.java:346)
	at org.eclipse.jdt.internal.corext.refactoring.structure.ChangeSignatureProcessor.checkInitialConditions(ChangeSignatureProcessor.java:763)
	at org.eclipse.jdt.ls.core.internal.text.correction.RefactorProposalUtility.getChangeSignatureProposal(RefactorProposalUtility.java:972)
	at org.eclipse.jdt.ls.core.internal.corrections.RefactorProcessor.getChangeSignatureProposal(RefactorProcessor.java:1027)
	at org.eclipse.jdt.ls.core.internal.corrections.RefactorProcessor.getProposals(RefactorProcessor.java:160)
	at org.eclipse.jdt.ls.core.internal.handlers.CodeActionHandler.getCodeActionCommands(CodeActionHandler.java:187)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$14(JDTLanguageServer.java:765)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants