This is the mail archive of the mailing list for the Java project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: make java.awt.Font.equals tolerant of nullfromgetTransform

Scott Gilbertson wrote:
> >  * java/awt/ (defaultTransform): new field
> >  (getTransform): never return null
> > ...
> > +  // Default transform, used if peer.getTransform returns null
> > +  private AffineTransform defaultTransform;
> > +
 Thomas Fitzsimmons wrote:
> The defaultTransform field isn't listed in java.awt.Font's "Serialized
> Form" javadocs, so it should be marked transient (it looks like the rest
> of the class needs to be examined for serialization compliance as
> well...).

Hmmm.... If something's not there it probably shouldn't be there.  Given
your point, my tendency is to be very picky about how I do this little
change.  Sorry to bug you so many times on the same issue -- I'm trying to
get this part as right as it can be before blasting in the update which
makes xlib work with the latest java.awt.Font.

Revising my test with the JRE to print font.getPeer().getClass(), I see that
the FontPeer is class on Windows and
sun.awt.motif.MFontPeer on Linux.  Those sound analogous to our  If Sun ensured that the peer's
getTransform() always returned non-null, I'd get the results I'm seeing.

I'll push the stuff down to ClasspathFontPeer, so that Font doesn't need any
changes, and hence doesn't have loose bits of junk in it.  I think the
previous paragraph indicates that this change would be consistent with what
Sun does.

Re-coding now...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]