-
Bug
-
Resolution: Fixed
-
P3
-
6, 7
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2143805 | 6u1 | Philip Race | P3 | Resolved | Fixed | b01 |
This program below incorrectly prints false since JDK 6 b33 in April 2005 :
import java.awt.Font;
public class FNE {
public static void main(String[] args) throws Exception {
Font f1 = new Font("Lucida Sans", Font.PLAIN, 12);
Font cf1 = f1.deriveFont(Font.PLAIN, 12f);
f1.getAttributes();
//cf1.getAttributes();
System.out.println("equal="+f1.equals(cf1));
}
}
import java.awt.Font;
public class FNE {
public static void main(String[] args) throws Exception {
Font f1 = new Font("Lucida Sans", Font.PLAIN, 12);
Font cf1 = f1.deriveFont(Font.PLAIN, 12f);
f1.getAttributes();
//cf1.getAttributes();
System.out.println("equal="+f1.equals(cf1));
}
}
- backported by
-
JDK-2143805 Font.equals() incorrectly returns false if getAttributes() is called on just one of the fonts
- Resolved
- duplicates
-
JDK-6497219 Equal fonts are not equal
- Closed