Fix generics warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1077923 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2011-03-04 12:56:25 +00:00
parent 640a664542
commit 61c7755195

View File

@ -55,10 +55,9 @@ public class CellFormatPart {
NAMED_COLORS = new TreeMap<String, Color>(
String.CASE_INSENSITIVE_ORDER);
Map colors = HSSFColor.getIndexHash();
for (Object val : colors.values()) {
HSSFColor color = (HSSFColor) val;
Class type = color.getClass();
Map<Integer,HSSFColor> colors = HSSFColor.getIndexHash();
for (HSSFColor color : colors.values()) {
Class<? extends HSSFColor> type = color.getClass();
String name = type.getSimpleName();
if (name.equals(name.toUpperCase())) {
short[] rgb = color.getTriplet();