This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PATCH: make java.awt.Font.equals tolerant of null fromgetTransform
Um, I'm not entirely sure, not having looked at Sun's code. So I ran a
test, calling getTransform for a font in use in an existing AWT program.
It returns an identity transform. Sun's FontPeer doesn't seem to have a
getTransform method, so I guess the transform is contained only in the Font
class.
It looks like I should modify Font.getTransform instead, to return an
identity transform if the peer returns null. That would be more like Sun,
according to the afforementioned test results.
Coding now...
----- Original Message -----
From: "Thomas Fitzsimmons" <fitzsim@redhat.com>
To: "Scott Gilbertson" <scottg@mantatest.com>
Cc: "libgcj patches" <java-patches@gcc.gnu.org>
Sent: Wednesday, January 28, 2004 5:38 PM
Subject: Re: PATCH: make java.awt.Font.equals tolerant of null
fromgetTransform
> On Wed, 2004-01-28 at 16:24, Scott Gilbertson wrote:
> > The attached tiny patch fixes a NullPointerException in Font.equals.
> >
> > OK to commit?
> >
>
> I assume this approach, of the three you proposed, is "most like what
> sun does"? If so, then this can go in.
>
> Thanks,
> Tom
>
>