--- a/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java Tue Jul 03 20:54:45 2012 -0700
@@ -200,29 +200,25 @@
return true;
}
- private Font[] allFontsWithLogical;
static String[] sLogicalFonts = { "Serif", "SansSerif", "Monospaced", "Dialog", "DialogInput" };
@Override
public Font[] getAllFonts() {
- if (allFontsWithLogical == null)
- {
- Font[] newFonts;
- Font[] superFonts = super.getAllFonts();
- int numLogical = sLogicalFonts.length;
- int numOtherFonts = superFonts.length;
+ Font[] newFonts;
+ Font[] superFonts = super.getAllFonts();
+
+ int numLogical = sLogicalFonts.length;
+ int numOtherFonts = superFonts.length;
- newFonts = new Font[numOtherFonts + numLogical];
- System.arraycopy(superFonts,0,newFonts,numLogical,numOtherFonts);
+ newFonts = new Font[numOtherFonts + numLogical];
+ System.arraycopy(superFonts,0,newFonts,numLogical,numOtherFonts);
- for (int i = 0; i < numLogical; i++)
- {
- newFonts[i] = new Font(sLogicalFonts[i], Font.PLAIN, 1);
- }
- allFontsWithLogical = newFonts;
+ for (int i = 0; i < numLogical; i++)
+ {
+ newFonts[i] = new Font(sLogicalFonts[i], Font.PLAIN, 1);
}
- return java.util.Arrays.copyOf(allFontsWithLogical, allFontsWithLogical.length);
+ return newFonts;
}
}
--- a/jdk/src/solaris/native/sun/awt/fontpath.c Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/solaris/native/sun/awt/fontpath.c Tue Jul 03 20:54:45 2012 -0700
@@ -1240,7 +1240,7 @@
FC_CHARSET, 0, &charset);
if (result != FcResultMatch) {
free(family);
- free(family);
+ free(fullname);
free(styleStr);
free(file);
(*FcPatternDestroy)(pattern);
--- a/jdk/src/windows/native/sun/font/lcdglyph.c Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/windows/native/sun/font/lcdglyph.c Tue Jul 03 20:54:45 2012 -0700
@@ -409,7 +409,7 @@
*/
imageSize = bytesWidth*height;
glyphInfo = (GlyphInfo*)malloc(sizeof(GlyphInfo)+imageSize);
- if (malloc == NULL) {
+ if (glyphInfo == NULL) {
FREE_AND_RETURN;
}
glyphInfo->cellInfo = NULL;