SUGGESTED FIX
There's a very simple fix for this. Make Font.equals additionally
compare the Java "long"s which hold the pointer addresses for the "peers".
They'll be different for each of these cases.
% sccs diffs -C Font.java
------- Font.java -------
*** /tmp/sccs.FjaO5w Wed Feb 23 10:56:44 2005
--- Font.java Wed Feb 23 10:55:10 2005
***************
*** 1100,1105 ****
--- 1100,1106 ----
return (size == font.size)
&& (pointSize == font.pointSize)
&& (style == font.style)
+ && (pNativeFont == font.pNativeFont)
&& name.equals(font.name)
&& thismat[0] == thatmat[0]
&& thismat[1] == thatmat[1]
###@###.### 2005-2-24 00:21:47 GMT
|