You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/02/08 22:03:12 UTC

[GitHub] [lucene-solr] dweiss commented on a change in pull request #2326: LUCENE-9747: deal with NPE when package-info.java missing in the error messaging

dweiss commented on a change in pull request #2326:
URL: https://github.com/apache/lucene-solr/pull/2326#discussion_r572406190



##########
File path: dev-tools/missing-doclet/src/main/java/org/apache/lucene/missingdoclet/MissingDoclet.java
##########
@@ -430,6 +430,11 @@ private void error(Element element, String message) {
     fullMessage.append(element.getKind().toString().toLowerCase(Locale.ROOT));
     fullMessage.append("): ");
     fullMessage.append(message);
-    reporter.print(Diagnostic.Kind.ERROR, element, fullMessage.toString());
+    if (((element.getKind() == ElementKind.PACKAGE) && (fullMessage.toString().contains("javadocs are missing")))){

Review comment:
       Shouldn't reporter.print(kind, String) be used for everything package-related? Why limit to "javadocs are missing"? I suspect other elements will also emit an NPE.
   
   Can you post the stack trace from that NPE to jira too? I'm sure jdk folks will be interested.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org