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

NullPointerException in MojoClassVisitor.visit()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3
    • Component/s: None
    • Labels:
      None
    • Flags:
      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-fix.patch
          2 kB
          Stanislav Ochotnicky
        2. mplugin-unit-test.patch
          2 kB
          Stanislav Ochotnicky

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: