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
Exception in thread "main" spoon.SpoonException: Not allowed javaletter or keyword in identifier found. See JLS for correct identifier. Identifier: IgniteCache<Long,Person>
at spoon.support.reflect.reference.CtReferenceImpl.checkIdentiferForJLSCorrectness(CtReferenceImpl.java:108)
at spoon.support.reflect.reference.CtReferenceImpl.setSimpleName(CtReferenceImpl.java:52)
at spoon.support.compiler.jdt.ReferenceBuilder.getTypeReference(ReferenceBuilder.java:974)
at spoon.support.compiler.jdt.ReferenceBuilder.getTypeReference(ReferenceBuilder.java:748)
at spoon.support.compiler.jdt.ReferenceBuilder.getVariableReference(ReferenceBuilder.java:1057)
at spoon.support.compiler.jdt.JDTTreeBuilderHelper.createVariableAccess(JDTTreeBuilderHelper.java:164)
at spoon.support.compiler.jdt.JDTTreeBuilder.visit(JDTTreeBuilder.java:1535)
at org.eclipse.jdt.internal.compiler.ast.SingleNameReference.traverse(SingleNameReference.java:1093)
at org.eclipse.jdt.internal.compiler.ast.MessageSend.traverse(MessageSend.java:1170)
at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:154)
at org.eclipse.jdt.internal.compiler.ast.TryStatement.traverse(TryStatement.java:1254)
at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:154)
at org.eclipse.jdt.internal.compiler.ast.TryStatement.traverse(TryStatement.java:1254)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:411)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1689)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:822)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:783)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.traverseUnitDeclaration(JDTBasedSpoonCompiler.java:480)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.lambda$buildModel$0(JDTBasedSpoonCompiler.java:437)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.forEachCompilationUnit(JDTBasedSpoonCompiler.java:464)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildModel(JDTBasedSpoonCompiler.java:435)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnitsAndModel(JDTBasedSpoonCompiler.java:372)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildSources(JDTBasedSpoonCompiler.java:335)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:116)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:99)
at spoon.Launcher.buildModel(Launcher.java:772)
at main.app.main(app.java:625)
I've figured out why this happens. When a generic type is instantiated in a try-with-resources, and it's not actually a closeable resource, JDT resolves it as a ProblemReferenceBinding with a compound name that includes the entire declaration (e.g. Type<K,V>) instead of a PrameterizedTypeBinding. It therefore fails the JLS identifier check.
Occurs for apache/ignite@b1529fb
The text was updated successfully, but these errors were encountered: