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
It would be kind of funny if it wasn't so sad, but after #4052 indexing no longer works correctly with a ZIP as input source... Indexing from the file system works though 🙃
More elaborate problem statement
My JavadocAPI refuses to find Javadoc for quite a few entries in JDK 16 when it is indexed from a ZIP file. The element is there but it finds no comment. This only happens if I include a substantial part of the JDK in the zip.
==== Building spoon model ====
Starting phase COMPILE
Phase COMPILE done! Discovered Classes: 49
Starting phase COMMENT
Phase COMMENT done! Discovered Classes: 49
Starting phase MODEL
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding.getAnnotationType()" because "annotation" is null
at spoon.support.compiler.jdt.JDTTreeBuilderQuery.hasAnnotationWithType(JDTTreeBuilderQuery.java:178)
at spoon.support.compiler.jdt.ParentExiter.scanCtElement(ParentExiter.java:156)
at spoon.reflect.visitor.CtInheritanceScanner.visitCtField(CtInheritanceScanner.java:593)
at spoon.support.reflect.declaration.CtFieldImpl.accept(CtFieldImpl.java:53)
at spoon.reflect.visitor.CtInheritanceScanner.scan(CtInheritanceScanner.java:181)
at spoon.support.compiler.jdt.ContextBuilder.exit(ContextBuilder.java:132)
at spoon.support.compiler.jdt.JDTTreeBuilder.endVisit(JDTTreeBuilder.java:640)
at org.eclipse.jdt.internal.compiler.ast.SingleMemberAnnotation.traverse(SingleMemberAnnotation.java:76)
at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.traverse(FieldDeclaration.java:375)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1699)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:827)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:788)
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:781)
at de.ialistannen.javadocapi.indexing.Indexer.main(Indexer.java:62)
result of the JDT "Main" class trying to extract the module info by parsing the compilation unit. This works when the file is named correctly without the random temporary file numbers.
Problem statement
It would be kind of funny if it wasn't so sad, but after #4052 indexing no longer works correctly with a ZIP as input source... Indexing from the file system works though 🙃
More elaborate problem statement
My JavadocAPI refuses to find Javadoc for quite a few entries in JDK 16 when it is indexed from a ZIP file. The element is there but it finds no comment. This only happens if I include a substantial part of the JDK in the zip.
I would love to test my MWE from the other bug but that crashes Spoon during model building:
The MWE works when I unzip it however...
CC: @andrewbwogi
EDIT:
A lead could be this
result of the JDT "Main" class trying to extract the module info by parsing the compilation unit. This works when the file is named correctly without the random temporary file numbers.
I "fixed" this locally by doing:
Which names the files correctly after extracting them from the ZIP.
The text was updated successfully, but these errors were encountered: