Uploaded image for project: 'Jandex'
  1. Jandex
  2. JANDEX-32

JarIndexer mishandles paths with the extension in multiple elements

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • 1.2.4.Final
    • 1.2.2.Final, 2.0.0.Beta1
    • None

    Description

      FileNotFoundException for some JAR file paths when the index file path is constructed.

      The problem appears to be in org.jboss.jandex.JarIndexer#getIndexFile(File, boolean), wherein every occurrence of the extension is replaced in the entire JAR file path, such that path elements that include the extension (e.g., ".jar") are incorrectly modified.
      An example from Jandex used in an Arquillian context:
      /private/var/folders/41/qy6ftgc53mn4v01s3xnytzgc0000gq/T/arquillian8152228539718351683MyTestApp.jar/MyTestApp.jar
      where arquillian8152228539718351683MyTestApp.jar is a directory, and the resulting index file path is
      /private/var/folders/41/qy6ftgc53mn4v01s3xnytzgc0000gq/T/arquillian8152228539718351683MyTestApp-jar/MyTestApp-jar.idx
      and there is no valid directory named arquillian8152228539718351683MyTestApp-jar

      Attachments

        Issue Links

          Activity

            People

              jgreene@redhat.com Jason Greene
              pzampino_jira Phil Zampino (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: