Uploaded image for project: 'Maven Indexer'
  1. Maven Indexer
  2. MINDEXER-144

IndexOutOfBoundsException during indexing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.1.1
    • 6.2.0
    • None

    Description

      Hello devs,

      I am encountering IOOBEs while trying to index the local repository using the new maven-indexer.

      context:

      I am currently trying to upgrade indexer-core from 6.0.0 to 6.1.1 (and lucene 5.x to 8.x) of the NetBeans maven support modules (https://github.com/apache/netbeans/pull/3558). Attached is a pom of a test project which triggers the Exception.

      All artifacts which caused the exception were snapshot builds, the attached pom works fine if "-SNAPSHOT" is removed from the version element. The same artifacts indexed fine before, while using indexer-6.0 and lucene 5.x.

      ...
      java.lang.IndexOutOfBoundsException: start 51, end 59, length 55 at java.base/java.lang.AbstractStringBuilder.checkRange(AbstractStringBuilder.java:1802) at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:680) at java.base/java.lang.StringBuilder.append(StringBuilder.java:218) at org.apache.maven.index.artifact.M2GavCalculator.getSnapshotGav(M2GavCalculator.java:187) at org.apache.maven.index.artifact.M2GavCalculator.pathToGav(M2GavCalculator.java:103) at org.apache.maven.index.DefaultArtifactContextProducer.getGavFromPath(DefaultArtifactContextProducer.java:159) at org.apache.maven.index.DefaultArtifactContextProducer.getArtifactContext(DefaultArtifactContextProducer.java:83) at org.netbeans.modules.maven.indexer.CustomArtifactContextProducer.getArtifactContext(CustomArtifactContextProducer.java:40)
      ... see attachment

       

      Please let me know if you need more info or think that this is not an issue with maven-indexer.

       

      full exception+pom attached

      Attachments

        1. ex6
          3 kB
          Michael Bien
        2. pom.xml
          8 kB
          Michael Bien

        Activity

          People

            cstamas Tamas Cservenak
            mbien Michael Bien
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: