Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4115810

TextHitInfo.afterOffset(int) creates wrong hit, per javadoc spec

XMLWordPrintable

    • 2d
    • 1.2beta4
    • generic
    • solaris_2.5
    • Verified

      The spec reads:

      "Create a hit at offset, associated with the character after the offset."

      For beforeOffset(int), the spec reads:
      "Create a hit at offset, associated with the character before the offset."

      beforeOffset creates a trailing hit at (offset - 1).

      Logically, afterOffset should create a leading hit at (offset + 1).
      However, the current code creates a leading hit at (offset).

            jkaulorcl Jeet Kaul (Inactive)
            sflemingsunw Steve Fleming (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: