Behaviour java.awt.font.NumericShaper.getContextualShaper(int,int) is unclear.

XMLWordPrintable

    • 2d
    • b56
    • sparc
    • solaris_9
    • Verified

      Name: lm153972 Date: 09/09/2004


      For method:
      public static NumericShaper getContextualShaper(int ranges, int defaultContext)

      result when defaultContext is not legal context is unknown.
      It seems that IllegalArgumentException will be thrown but
      such behaviour is not specified.

      This is example and its output.
      ------------------------------ Numeric.java ------------------------------------
      import java.awt.font.*;
      public class Numeric
      {
           public static void main(String[] args){
              NumericShaper shaper = NumericShaper.getContextualShaper(NumericShaper.ARABIC,90);
           }
      }

      ------------------------------ output ---------------------------------------------
      Exception in thread "main" java.lang.IllegalArgumentException: invalid shaper: 5a
               at java.awt.font.NumericShaper.getKeyFromMask(NumericShaper.java:616)
               at java.awt.font.NumericShaper.getContextualShaper(NumericShaper.java:667)
               at Numeric.main(Numeric.java:10)


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

            Assignee:
            Philip Race
            Reporter:
            Leonid Mesnik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: