Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9747

Missing package-info.java causes NPE in MissingDoclet.java

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 9.0
    • 9.0
    • general/javadocs
    • None
    • New

    Description

      When running ./gradlew :solr:core:javadoc discovered that if a package directory is missing the package-info.java file you get a VERY cryptic error:

       

      javadoc: error - fatal error encountered: java.lang.NullPointerException
      javadoc: error - Please file a bug against the javadoc tool via the Java bug reporting page

       

      I poked around and that the MissingDoclet.java method call to reporter.print(Diagnostic.Kind.ERROR, element, fullMessage.toString()); was failing, due to the element having some sort of null in it.  I am attaching a patch and a PR.

      Attachments

        1. LUCENE-9747.patch
          4 kB
          Eric Pugh

        Activity

          People

            dweiss Dawid Weiss
            epugh Eric Pugh
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2.5h
                2.5h