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>( NAMED_COLORS = new TreeMap<String, Color>(
String.CASE_INSENSITIVE_ORDER); String.CASE_INSENSITIVE_ORDER);
Map colors = HSSFColor.getIndexHash(); Map<Integer,HSSFColor> colors = HSSFColor.getIndexHash();
for (Object val : colors.values()) { for (HSSFColor color : colors.values()) {
HSSFColor color = (HSSFColor) val; Class<? extends HSSFColor> type = color.getClass();
Class type = color.getClass();
String name = type.getSimpleName(); String name = type.getSimpleName();
if (name.equals(name.toUpperCase())) { if (name.equals(name.toUpperCase())) {
short[] rgb = color.getTriplet(); short[] rgb = color.getTriplet();