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: initialize uncategorized array #242

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Conversation

alicejli
Copy link
Contributor

@alicejli alicejli commented Feb 9, 2024

As part of testing javadoc generation for handwritten libraries with the newest version of the doclet, bigquerystorage was failing:

15:00:15:365 [ERROR] error: fatal error encountered: java.lang.NullPointerException: Cannot invoke "java.util.List.add(Object)" because the return value of "java.util.LinkedHashMap.get(Object)" is null
15:00:15:365 [ERROR] error: Please file a bug against the javadoc tool via the Java bug reporting page
15:00:15:365 [ERROR]   (https://bugreport.java.com) after checking the Bug Database (https://bugs.java.com)
15:00:15:365 [ERROR]   for duplicates. Include error messages and the following diagnostic in your report. Thank you.
15:00:15:365 [ERROR] java.lang.NullPointerException: Cannot invoke "java.util.List.add(Object)" because the return value of "java.util.LinkedHashMap.get(Object)" is null
15:00:15:365 [ERROR] 	at com.microsoft.model.StubPackageToc.addUncategorized(StubPackageToc.java:36)
15:00:15:365 [ERROR] 	at com.microsoft.build.ClassBuilder.buildFilesForStubPackage(ClassBuilder.java:152)
15:00:15:365 [ERROR] 	at com.microsoft.build.ClassBuilder.buildFilesForPackage(ClassBuilder.java:78)
15:00:15:365 [ERROR] 	at com.microsoft.build.YmlFilesBuilder$Processor.buildPackage(YmlFilesBuilder.java:208)
15:00:15:365 [ERROR] 	at com.microsoft.build.YmlFilesBuilder$Processor.lambda$buildPackage$1(YmlFilesBuilder.java:214)
15:00:15:365 [ERROR] 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
15:00:15:365 [ERROR] 	at com.microsoft.build.YmlFilesBuilder$Processor.buildPackage(YmlFilesBuilder.java:214)
15:00:15:365 [ERROR] 	at com.microsoft.build.YmlFilesBuilder$Processor.process(YmlFilesBuilder.java:157)
15:00:15:365 [ERROR] 	at com.microsoft.build.YmlFilesBuilder.build(YmlFilesBuilder.java:88)
15:00:15:365 [ERROR] 	at com.microsoft.doclet.DocFxDoclet.run(DocFxDoclet.java:57)
15:00:15:365 [ERROR] 	at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:556)
15:00:15:365 [ERROR] 	at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:393)
15:00:15:365 [ERROR] 	at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:342)
15:00:15:365 [ERROR] 	at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
15:00:15:365 [ERROR] 	at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)

The Uncategorized section in the StubToc was not initialized, causing this error. This resolves it (confirmed by testing it with bigquerystorage).

@alicejli alicejli requested a review from a team as a code owner February 9, 2024 20:19
@alicejli alicejli merged commit 8d710f4 into main Feb 9, 2024
7 checks passed
@alicejli alicejli deleted the fixNullPointerStubTOC branch February 9, 2024 22:43
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 this pull request may close these issues.

2 participants