Font comparison in JComponent.setFont() uses `font != oldFont` check which is 
not correct as per Object equality essence. The correct way of checking font 
equality is to use "equals" as is done in 
[GlyphLayout](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/sun/font/GlyphLayout.java#L144)
 , 
[StandardGlyphVector](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/sun/font/StandardGlyphVector.java#L657)
 etc

Existing jtreg, jck test are green.

-------------

Commit messages:
 - 6742362: JComponent.setFont() font comparison is not correct

Changes: https://git.openjdk.java.net/jdk/pull/7571/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7571&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-6742362
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7571.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7571/head:pull/7571

PR: https://git.openjdk.java.net/jdk/pull/7571

Reply via email to