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

ClassCastException in the Font(Map)

XMLWordPrintable

    • 2d
    • b22
    • x86
    • windows_xp
    • Verified

        FULL PRODUCT VERSION :


        A DESCRIPTION OF THE PROBLEM :
        When i am using the below statement

        Font f = new Font(Map attributes);

        Than with JDK1.4/1.5 it is working fine but if i use this statement with JDK1.6 than it is throwing below exception:

        java.lang.ClassCastException: java.lang.String cannot be cast to java.text.AttributedCharacterIterator$Attribute
        at sun.font.AttributeValues.merge(AttributeValues.java:305)
        at sun.font.AttributeValues.fromMap(AttributeValues.java:341)
        at java.awt.Font.<init>(Font.java:645)



        REPRODUCIBILITY :
        This bug can be reproduced always.

        Release Regression From : 6
        The above release value was the last known release where this
        bug was not reproducible. Since then there has been a regression.

              srl Steven Loomis
              prr Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: