aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelle Schuhmacher2014-03-06 16:04:29 (EST)
committerLars Vogel2014-03-07 13:05:05 (EST)
commit62ef1bc10ef97131082601cb48ca13a6cf55ec9b (patch)
tree71357204b974d2f31e866dd26ffd9fea6faa6a92
parentad46fa216dc1dd2cd910f85b78ecc12bd190be07 (diff)
downloadeclipse.platform.ui-62ef1bc10ef97131082601cb48ca13a6cf55ec9b.zip
eclipse.platform.ui-62ef1bc10ef97131082601cb48ca13a6cf55ec9b.tar.gz
eclipse.platform.ui-62ef1bc10ef97131082601cb48ca13a6cf55ec9b.tar.bz2
Bug 428355 - [New Contributors] Fix warnings in platform projectsrefs/changes/13/23013/2
Resolved warnings in ColorUtil. Change-Id: I7ed74ed57756c761584d00d8f8fb83b1c8c32a7e Signed-off-by: Jelle Schuhmacher <me@jschuhmacher.nl>
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/ColorUtil.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/ColorUtil.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/ColorUtil.java
index 5bdcde2..6803d57 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/ColorUtil.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/ColorUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2009, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.ui.themes;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
-
import org.eclipse.jface.resource.DataFormatException;
import org.eclipse.jface.resource.StringConverter;
import org.eclipse.swt.SWT;
@@ -65,9 +64,9 @@ public final class ColorUtil {
*/
private static Field[] getFields() {
if (cachedFields == null) {
- Class clazz = SWT.class;
+ Class<SWT> clazz = SWT.class;
Field[] allFields = clazz.getDeclaredFields();
- ArrayList applicableFields = new ArrayList(allFields.length);
+ ArrayList<Field> applicableFields = new ArrayList<Field>(allFields.length);
for (int i = 0; i < allFields.length; i++) {
Field field = allFields[i];
@@ -80,7 +79,7 @@ public final class ColorUtil {
applicableFields.add(field);
}
}
- cachedFields = (Field []) applicableFields.toArray(new Field [applicableFields.size()]);
+ cachedFields = applicableFields.toArray(new Field[applicableFields.size()]);
}
return cachedFields;
}