Uploaded image for project: 'Axiom'
  1. Axiom
  2. AXIOM-450

getSkipArray bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.2.14
    • 1.2.15
    • API
    • None

    Description

      Starting on line 134 of ByteSearch.java, the for loop should be:

      for (int k = pattern.length-1; k > 0; k--) {
      skip[pattern[k] &(0xff)] = (short)k;
      }

      That is, it loops from the last character to the first character (exclusive), and sets the skip pattern to the distance between the character and the start of the array (which is just the index in the array).

      Attachments

        Activity

          People

            veithen Andreas Veithen
            davee David
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: