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

need spec for java.awt.Font.decode(String)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.3.1
    • 1.2.0
    • docs
    • ladybird
    • sparc
    • solaris_2.5



        Name: mgC56079 Date: 05/18/98



        --- Here is the javadoc (jdk1.2beta4F) ---
            /**
             * Returns the specified font using the name passed in.
             * @param str the name.
             * @since JDK1.1
             */
            public static Font decode(String str)
        ---

        Font.decode of jdk1.2beta4F is incompatible with the one of 1.1.x.
        decode("Name-bold") returns new Font("Name", Font.PLAIN, 12) under 1.1.x
        but returns new Font("Name", Font.BOLD, 12) under 1.2beta4F.
        This causes jck1.1.6, jck1.2beta2 test failure:
        api/java_awt/Font/manual.html#Decode

        It is not crear from the spec which code is correct.
        JCK regression problem cannot be fixed unless the precise spec is available.
        The spec should be updated.

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

              jballsunw Jennifer Ball (Inactive)
              mgorshen Mikhail Gorshenev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: