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

REGRESSION:Tree JCK-runtime-15 api/java_awt/Font and api/java_awt/java2d/awt/Fon

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2
    • None
    • 5.0
    • client-libs
    • 2d
    • sparc
    • solaris_2.6

    Description



      Name: dsR10051 Date: 06/27/2003


      Filed By : SPB JCK team (###@###.###)
      JDK : java full version "1.5.0-beta-b09"
      JCK : 1.5
      Platform[s] : Solaris
      switch/Mode :
      JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
      Failing Test [s] :
          api/java_awt/Font/descriptions.html#Decode[Font1002]
          api/java_awt/Font/descriptions.html#GetFont[Font1003]
          api/java_awt/java2d/awt/Font/index.html#DecodeTesttestCase1


      Problem description
      ===================
      Tests
      api/java_awt/Font/descriptions.html#Decode[Font1002]
      api/java_awt/Font/descriptions.html#GetFont[Font1003]
      api/java_awt/java2d/awt/Font/index.html#DecodeTesttestCase1
      for method
      public static Font decode(String str)
      public static Font getFont(String nm, Font font)
      fails if String parameter value describes "bold" style font.
      In this case methods return font with plain style.
          
      Minimized test:
      ===============
      ------- FontDecode02.java -------
      import java.awt.Font;

      public class FontDecode02 {

          public static void main(String[] args) {
              String value = "Name-bold";
              String name = "Name";
              int style = Font.BOLD;
              int size = 12;
              Font f = Font.decode(value);
              if (f.getName().equals(name) &&
                      f.getStyle() == style &&
                      f.getSize() == size) {
                  System.out.println("OKAY");
              } else {
                  System.out.println("Failed:");
                  System.out.println("name : <" + f.getName() + ">, expected: <" + name + ">");
                  System.out.println("style: " + f.getStyle() + ", expected: " + style);
                  System.out.println("size : " + f.getSize() + ", expected: " + size);
              }
          }
      }

      ------- end-of-FontDecode02.java -------

      Minimized test output:
      ======================
      % /set/java/jdk1.5.0/solaris/bin/java -version
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b09)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b09, mixed mode)
      % /set/java/jdk1.5.0/solaris/bin/java FontDecode02
      Failed:
      name : <Name>, expected: <Name>
      style: 0, expected: 1
      size : 12, expected: 12


      JCK test source location:
      ==========================
      /java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests

      Additional comments:
      ====================
      Please, note that this test works correctly with previous JDKs, for example with JDK1.4.2-b25
      %java -version
      java version "1.4.2-rc"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-rc-b25)
      Java HotSpot(TM) Client VM (build 1.4.2-rc-b25, mixed mode)
      % java FontDecode02
      OKAY


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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sdasunw Sda Sda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: