From: Jeremias Maerki Date: Thu, 10 Feb 2011 15:22:00 +0000 (+0000) Subject: Fix deprecation. X-Git-Tag: fop-1_1rc1old~290^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fheads%2FTemp_Color;p=xmlgraphics-fop.git Fix deprecation. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Color@1069423 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/pdf/PDFColorHandler.java b/src/java/org/apache/fop/pdf/PDFColorHandler.java index fb5a0ba12..76a6cab78 100644 --- a/src/java/org/apache/fop/pdf/PDFColorHandler.java +++ b/src/java/org/apache/fop/pdf/PDFColorHandler.java @@ -30,12 +30,12 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.xmlgraphics.java2d.color.CIELabColorSpace; -import org.apache.xmlgraphics.java2d.color.ColorWithAlternatives; import org.apache.xmlgraphics.java2d.color.ColorUtil; +import org.apache.xmlgraphics.java2d.color.ColorWithAlternatives; import org.apache.xmlgraphics.java2d.color.DeviceCMYKColorSpace; import org.apache.xmlgraphics.java2d.color.NamedColorSpace; +import org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil; -import org.apache.fop.util.ColorProfileUtil; import org.apache.fop.util.DecimalFormatCache; /** @@ -48,7 +48,7 @@ public class PDFColorHandler { private PDFResources resources; - private Map cieLabColorSpaces; + private Map cieLabColorSpaces; public PDFColorHandler(PDFResources resources) { this.resources = resources; @@ -149,10 +149,10 @@ public class PDFColorHandler { private PDFCIELabColorSpace getCIELabColorSpace(CIELabColorSpace labCS) { if (this.cieLabColorSpaces == null) { - this.cieLabColorSpaces = new java.util.HashMap(); + this.cieLabColorSpaces = new java.util.HashMap(); } float[] wp = labCS.getWhitePoint(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < 3; i++) { if (i > 0) { sb.append(','); @@ -160,7 +160,7 @@ public class PDFColorHandler { sb.append(wp[i]); } String key = sb.toString(); - PDFCIELabColorSpace cielab = (PDFCIELabColorSpace)this.cieLabColorSpaces.get(key); + PDFCIELabColorSpace cielab = this.cieLabColorSpaces.get(key); if (cielab == null) { //color space is not in the PDF, yet float[] wp1 = new float[] {wp[0] / 100f, wp[1] / 100f, wp[2] / 100f};