Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-545

maven-dependency-analyzer fails on classes containing constant long or double

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • maven-dependency-analyzer-1.7
    • None
    • None

    Description

      The maven-dependency-analyzer was updated to parse the constant pool on each class file so that it can discover method references and constant references, but the ConstantPoolParser is missing two critical lines that cause it to throw an exception on any class file containing a constant long or constant double field. According to the Javadoc, the class was adapted from this stack overflow answer. If you look inside the switch statement at the cases for longs and doubles, it increments the index. But the ConstantPoolParser is missing this increment. This causes it to land here and throw an exception on all but the most trivial codebases. In this pull request I fixed the bug and updated one of the test classes to have a constant long field to prevent regressions.

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              jhaber Jonathan Haber
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: