diff --git a/src/java/org/apache/poi/ss/format/CellFormatPart.java b/src/java/org/apache/poi/ss/format/CellFormatPart.java index cedc94fe2..f78049a4c 100644 --- a/src/java/org/apache/poi/ss/format/CellFormatPart.java +++ b/src/java/org/apache/poi/ss/format/CellFormatPart.java @@ -55,10 +55,9 @@ public class CellFormatPart { NAMED_COLORS = new TreeMap( String.CASE_INSENSITIVE_ORDER); - Map colors = HSSFColor.getIndexHash(); - for (Object val : colors.values()) { - HSSFColor color = (HSSFColor) val; - Class type = color.getClass(); + Map colors = HSSFColor.getIndexHash(); + for (HSSFColor color : colors.values()) { + Class type = color.getClass(); String name = type.getSimpleName(); if (name.equals(name.toUpperCase())) { short[] rgb = color.getTriplet();