You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
packagefoo;
importorg.osgi.service.component.annotations.Component;
@ComponentpublicclassFooServiceImplimplementsFooService {
@OverridepublicvoiddoStuff(Integerinput) {
switch(input) {
caseIntegeri -> {} // java.lang.UnsupportedOperationException: Operation only supported in JLS21 AST//default -> {} // works
}
}
}
An error message pops up when saving the file:
Errors occurred during the build.
Errors running builder 'Java Builder' on project 'Dummy'.
Operation only supported in JLS21 AST
From the Error Log:
java.lang.UnsupportedOperationException: Operation only supported in JLS21 AST
at org.eclipse.jdt.core.dom.ASTNode.supportedOnlyIn21(ASTNode.java:2587)
at org.eclipse.jdt.core.dom.Pattern.<init>(Pattern.java:42)
at org.eclipse.jdt.core.dom.NullPattern.<init>(NullPattern.java:66)
at org.eclipse.jdt.core.dom.ASTConverter.createFakeNullPattern(ASTConverter.java:4883)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2941)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2039)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1486)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:3197)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:3334)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:3221)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:813)
at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:208)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:3567)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1595)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1052)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:739)
at org.eclipse.jdt.core.dom.CompilationUnitResolver$ECJCompilationUnitResolver.resolve(CompilationUnitResolver.java:111)
at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:968)
at org.eclipse.pde.ds.internal.annotations.DSAnnotationCompilationParticipant.processAnnotations(DSAnnotationCompilationParticipant.java:717)
at org.eclipse.pde.ds.internal.annotations.DSAnnotationCompilationParticipant.processAnnotations(DSAnnotationCompilationParticipant.java:653)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.processAnnotations(AbstractImageBuilder.java:770)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:383)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:79)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:286)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:198)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1077)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:296)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:352)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:441)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:444)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:555)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:503)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:585)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:207)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:300)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
I did not dig into the problem to much, but I suppose the hard-coded JLS4 Constant is a part of the problem:
An error message pops up when saving the file:
From the Error Log:
I did not dig into the problem to much, but I suppose the hard-coded JLS4 Constant is a part of the problem:
eclipse.pde/ds/org.eclipse.pde.ds.annotations/src/org/eclipse/pde/ds/internal/annotations/DSAnnotationCompilationParticipant.java
Line 705 in 2d6fc0c
The text was updated successfully, but these errors were encountered: