Uploaded image for project: 'JSword'
  1. JSword
  2. JS-137

StringIndexOutOfBoundsException in GBFFilter ~ line 115

    Details

      Description

      I'm not able to replicate and have lost the stack trace, but here's the cause of it, and the fix should be easy. Not sure why I can't replicate though:

      Exception: String index out of range: 8

      so if 'remains' is of length 8, ltpos = 7 => StringIndexOutOfBoundsException

      Code:
      if (ltpos >= 0
      && ltpos < remains.length()
      && Character.isUpperCase(remains.charAt(ltpos + 1)))

      { DataPolice.report("Possible bad GBF tag" + remains); //$NON-NLS-1$ }

      Is the easy fix just to ensure that ltpost < remains.length() - 1
      Or is more complicated than that?

        Attachments

          Activity

            People

            • Assignee:
              dmsmith DM Smith
              Reporter:
              chrisburrell Chris Burrell
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: