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

TextLayout equals method is not implemented

    XMLWordPrintable

Details

    • 2d
    • b127
    • generic, x86
    • generic, windows_2000

    Backports

      Description



        Name: md23716 Date: 08/29/2001

        Using 1.3.1-b24 on Windows 2000 5.00.2195.

                Compile TextArea1.java >>>

        import java.awt.*;
        import java.awt.geom.*;
        import java.awt.font.*;

        class TextArea1
        {
          public static void main(String args[])
          {
          TextLayout l1=new TextLayout("Hello",new Font("Helvetica",Font.PLAIN,12),new FontRenderContext(new AffineTransform(),true,true));
          TextLayout l2=new TextLayout("Hello",new Font("Helvetica",Font.PLAIN,12),new FontRenderContext(new AffineTransform(),true,true));
           System.out.println(l1.equals(l2));
          }
        }

        >>>

        If you run java TextArea1 then the output shows as false.

        The suggested fix is to override the equals method in the TextLine.java file.



        ======================================================================
        ###@###.### 2001-08-29
        A test case was provided by the submitter of this bug in a separate email:


        ###@###.### 2001-08-29
        Removed test case from this bug - it was intended for another bug ID (apologies)

        Attachments

          Issue Links

            Activity

              People

                prr Philip Race
                mdevereuorcl Michelle Devereux (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: