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

Spec for java.awt.font.NumericShaper is unclear.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 1.4.0, 5.0
    • client-libs
    • None
    • 2d
    • b33
    • sparc
    • solaris_9
    • Verified

      Name: lm153972 Date: 09/14/2004


      The behaviour of functions:
      public void shape(char[] text, int start, int count)
      public void shape(char[] text, int start, int count, int context)
      is undefined when start or start + count are out of bounds of text.

      (There is ArrayIndexOutOfBoundsException there.)
      Here is example:
      ------------------------------- Shaper.java -------------------------
      import java.awt.font.NumericShaper;

      class Shaper {
          public static final void main(String[] args){
              NumericShaper sh = NumericShaper.getContextualShaper(0);
              char[] t = { '8', '0'};
              sh.shape(t,0,11);
          }
      }

      ---------------------------------------------------------------------

      ======================================================================

            dougfelt Doug Felt (Inactive)
            lmesnik Leonid Mesnik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: