aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpablocabrera852014-03-19 00:20:59 (EDT)
committerPaul Webster2014-03-19 00:43:20 (EDT)
commit37976644f590a49e4efe2d3e9540bbc90481f573 (patch)
treecb7b9fb6c6c65040e310eca2664f73b61710daf5
parent1112f01ddfb92605fb2dbdced050539e95981953 (diff)
downloadeclipse.platform.ui-37976644f590a49e4efe2d3e9540bbc90481f573.zip
eclipse.platform.ui-37976644f590a49e4efe2d3e9540bbc90481f573.tar.gz
eclipse.platform.ui-37976644f590a49e4efe2d3e9540bbc90481f573.tar.bz2
Bug 428355 - [New Contributors] Fix warnings in platform projects refs/changes/80/23580/4
Change-Id: Idb5e7440bbea155eee3d67acf73bce8ab9eb216e Signed-off-by: pablocabrera85 <pablo.cabrera@mulesoft.com>
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutData.java38
1 files changed, 15 insertions, 23 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutData.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutData.java
index 6ad2903..52bbc13 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutData.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutData.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 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
@@ -7,18 +7,18 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Pablo Cabrera <pablo.cabrera@mulesoft.com> - Bug 428355
*******************************************************************************/
package org.eclipse.ui.internal.about;
+import com.ibm.icu.text.Collator;
import java.io.IOException;
import java.net.URL;
-import com.ibm.icu.text.Collator;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
-
import org.eclipse.jface.resource.ImageDescriptor;
/**
@@ -73,10 +73,10 @@ public abstract class AboutData {
* @param infos
*/
private static void reverse(AboutData[] infos) {
- List infoList = Arrays.asList(infos);
+ List<AboutData> infoList = Arrays.asList(infos);
Collections.reverse(infoList);
for (int i = 0; i < infos.length; ++i) {
- infos[i] = (AboutData) infoList.get(i);
+ infos[i] = infoList.get(i);
}
}
@@ -98,14 +98,12 @@ public abstract class AboutData {
return;
}
- Arrays.sort(infos, new Comparator() {
+ Arrays.sort(infos, new Comparator<AboutData>() {
Collator collator = Collator.getInstance(Locale.getDefault());
- public int compare(Object a, Object b) {
- AboutData info1 = (AboutData) a;
- AboutData info2 = (AboutData) b;
+ public int compare(AboutData info1, AboutData info2) {
- String provider1 = info1.getProviderName();
+ String provider1 = info1.getProviderName();
String provider2 = info2.getProviderName();
if (!provider1.equals(provider2)) {
@@ -134,13 +132,11 @@ public abstract class AboutData {
return;
}
- Arrays.sort(infos, new Comparator() {
+ Arrays.sort(infos, new Comparator<AboutData>() {
Collator collator = Collator.getInstance(Locale.getDefault());
- public int compare(Object a, Object b) {
- AboutData info1 = (AboutData) a;
- AboutData info2 = (AboutData) b;
- return collator.compare(info1.getName(), info2.getName());
+ public int compare(AboutData info1, AboutData info2) {
+ return collator.compare(info1.getName(), info2.getName());
}
});
}
@@ -163,12 +159,10 @@ public abstract class AboutData {
return;
}
- Arrays.sort(infos, new Comparator() {
+ Arrays.sort(infos, new Comparator<AboutData>() {
Collator collator = Collator.getInstance(Locale.getDefault());
- public int compare(Object a, Object b) {
- AboutData info1 = (AboutData) a;
- AboutData info2 = (AboutData) b;
+ public int compare(AboutData info1, AboutData info2) {
String version1 = info1.getVersion();
String version2 = info2.getVersion();
@@ -200,12 +194,10 @@ public abstract class AboutData {
return;
}
- Arrays.sort(infos, new Comparator() {
+ Arrays.sort(infos, new Comparator<AboutData>() {
Collator collator = Collator.getInstance(Locale.getDefault());
- public int compare(Object a, Object b) {
- AboutData info1 = (AboutData) a;
- AboutData info2 = (AboutData) b;
+ public int compare(AboutData info1, AboutData info2) {
String id1 = info1.getId();
String id2 = info2.getId();