Mercurial > hg > release > icedtea8-forest-3.0 > jdk
changeset 8712:aca4a67e560d
8001173: [findbugs] Evaluate FindBug output for sun.font.CompositeFont, sun.font.CompositeFontDescriptor
Reviewed-by: prr, bae
author | vadim |
---|---|
date | Wed, 23 Oct 2013 08:56:56 +0400 |
parents | c55a8480cc27 |
children | 92af0666c168 |
files | src/share/classes/sun/font/StandardTextSource.java src/share/classes/sun/font/TextLabelFactory.java src/solaris/classes/sun/font/FontConfigManager.java |
diffstat | 3 files changed, 3 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/sun/font/StandardTextSource.java Tue Oct 22 15:39:33 2013 -0700 +++ b/src/share/classes/sun/font/StandardTextSource.java Wed Oct 23 08:56:56 2013 +0400 @@ -97,7 +97,7 @@ throw new IllegalArgumentException("bad frc: null"); } - this.chars = chars; + this.chars = chars.clone(); this.start = start; this.len = len; this.cstart = cstart; @@ -148,7 +148,7 @@ // TextSource API public char[] getChars() { - return chars; + return chars.clone(); } public int getStart() {
--- a/src/share/classes/sun/font/TextLabelFactory.java Tue Oct 22 15:39:33 2013 -0700 +++ b/src/share/classes/sun/font/TextLabelFactory.java Wed Oct 23 08:56:56 2013 +0400 @@ -32,7 +32,6 @@ import java.awt.Font; import java.awt.font.FontRenderContext; -import java.awt.font.LineMetrics; import java.text.Bidi; /** @@ -70,7 +69,7 @@ Bidi bidi, int flags) { this.frc = frc; - this.text = text; + this.text = text.clone(); this.bidi = bidi; this.flags = flags; this.lineBidi = bidi; @@ -82,30 +81,10 @@ return frc; } - public char[] getText() { - return text; - } - - public Bidi getParagraphBidi() { - return bidi; - } - public Bidi getLineBidi() { return lineBidi; } - public int getLayoutFlags() { - return flags; - } - - public int getLineStart() { - return lineStart; - } - - public int getLineLimit() { - return lineLimit; - } - /** * Set a line context for the factory. Shaping only occurs on this line. * Characters are ordered as they would appear on this line.
--- a/src/solaris/classes/sun/font/FontConfigManager.java Tue Oct 22 15:39:33 2013 -0700 +++ b/src/solaris/classes/sun/font/FontConfigManager.java Wed Oct 23 08:56:56 2013 +0400 @@ -108,10 +108,6 @@ public FontConfigManager() { } - public static String[] getFontConfigNames() { - return fontConfigNames; - } - /* Called from code that needs to know what are the AA settings * that apps using FC would pick up for the default desktop font. * Note apps can change the default desktop font. etc, so this @@ -182,7 +178,6 @@ t0 = System.nanoTime(); } - String[] fontConfigNames = FontConfigManager.getFontConfigNames(); FcCompFont[] fontArr = new FcCompFont[fontConfigNames.length]; for (int i = 0; i< fontArr.length; i++) {