Uploaded image for project: 'Maven Plugin Tools'
  1. Maven Plugin Tools
  2. MPLUGIN-242

NullPointerException in MojoClassVisitor.visit()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.3
    • None
    • None
    • Patch

    Description

      Annotation scanner in maven-plugin-tools-annotations assumes that all Java classes have superclass. This is mostly true, but there is one exception - java.lang.Object.

      If annotation scanner encounters a class with no super class (like java.lang.Object) it fails with NullPointerException in MojoClassVisitor.visit().

      Unit test reproducing the bug and proposed fix attached.

      Attachments

        1. mplugin-unit-test.patch
          2 kB
          Stanislav Ochotnicky
        2. mplugin-fix.patch
          2 kB
          Stanislav Ochotnicky

        Activity

          People

            hboutemy Herve Boutemy
            mizdebsk Mikolaj Izdebski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: