Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2011-01-07 21:40:16 +0000
committerChris Goldthorpe2011-01-07 21:40:16 +0000
commitb6e9f30e0aab46a8f33d4b52cdf9f5134de15132 (patch)
tree1f8819d969c420145c571ca1a772721dcb15d43b /org.eclipse.ua.tests/help/org
parente1e5825f8b39c2ee117c82968696431e83bcef14 (diff)
downloadeclipse.platform.ua-b6e9f30e0aab46a8f33d4b52cdf9f5134de15132.tar.gz
eclipse.platform.ua-b6e9f30e0aab46a8f33d4b52cdf9f5134de15132.tar.xz
eclipse.platform.ua-b6e9f30e0aab46a8f33d4b52cdf9f5134de15132.zip
Fix warnings when compiled with Java 5.0
Diffstat (limited to 'org.eclipse.ua.tests/help/org')
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java18
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/MockServletResponse.java8
3 files changed, 16 insertions, 16 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java
index da913ca02..fc60f8a21 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 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
@@ -30,7 +30,7 @@ public class EnabledTopicTest extends TestCase {
private String label;
private boolean isEnabled;
- private List children = new ArrayList();
+ private List<ITopic> children = new ArrayList<ITopic>();
public ETopic(String label, boolean isEnabled) {
this.label = label;
@@ -38,7 +38,7 @@ public class EnabledTopicTest extends TestCase {
}
public ITopic[] getSubtopics() {
- return (ITopic[])children.toArray(new ITopic[children.size()]);
+ return children.toArray(new ITopic[children.size()]);
}
public IUAElement[] getChildren() {
@@ -78,8 +78,8 @@ public class EnabledTopicTest extends TestCase {
private class EIndexEntry extends UAElement implements IIndexEntry {
private String keyword;
- private List topics = new ArrayList();
- private List subEntries = new ArrayList();
+ private List<ITopic> topics = new ArrayList<ITopic>();
+ private List<IIndexEntry> subEntries = new ArrayList<IIndexEntry>();
public EIndexEntry(String keyword) {
super(keyword);
@@ -99,18 +99,18 @@ public class EnabledTopicTest extends TestCase {
}
public IIndexEntry[] getSubentries() {
- return (IIndexEntry[])subEntries.toArray(new IIndexEntry[subEntries.size()]);
+ return subEntries.toArray(new IIndexEntry[subEntries.size()]);
}
public ITopic[] getTopics() {
- return (ITopic[])topics.toArray(new ITopic[topics.size()]);
+ return topics.toArray(new ITopic[topics.size()]);
}
public synchronized IUAElement[] getChildren() {
- List all = new ArrayList();
+ List<IUAElement> all = new ArrayList<IUAElement>();
all.addAll(subEntries);
all.addAll(topics);
- return (IUAElement[])all.toArray(new IUAElement[all.size()]);
+ return all.toArray(new IUAElement[all.size()]);
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java
index d5f1d4e4c..7bfeef4be 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 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
@@ -87,8 +87,8 @@ public class TocModelSerializerTest extends TestCase {
/**
* Find all the TOC files to use for this test.
*/
- public static Collection getTocFiles() {
- Collection tocFiles = new ArrayList();
+ public static Collection<TocFile> getTocFiles() {
+ Collection<TocFile> tocFiles = new ArrayList<TocFile>();
IExtensionPoint xpt = Platform.getExtensionRegistry().getExtensionPoint(HelpPlugin.PLUGIN_ID, "toc");
IExtension[] extensions = xpt.getExtensions();
for (int i=0;i<extensions.length;i++) {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/MockServletResponse.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/MockServletResponse.java
index 8c56279ee..cf8a4e955 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/MockServletResponse.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/MockServletResponse.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 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
@@ -27,7 +27,7 @@ import javax.servlet.http.HttpServletResponse;
public class MockServletResponse implements HttpServletResponse {
- private List cookies = new ArrayList();
+ private List<Cookie> cookies = new ArrayList<Cookie>();
private String illegalCharactersFound = "";
public String getCharacterEncoding() {
@@ -93,7 +93,7 @@ public class MockServletResponse implements HttpServletResponse {
checkForIllegalCharacters(cookie.getValue());
// Replace if it already exists, otherwise set
for (int i = 0; i < cookies.size(); i++) {
- Cookie nextCookie = (Cookie) cookies.get(i);
+ Cookie nextCookie = cookies.get(i);
if (nextCookie.getName().equals(cookie.getName())) {
cookies.remove(i);
cookies.add(cookie);
@@ -115,7 +115,7 @@ public class MockServletResponse implements HttpServletResponse {
}
public Cookie[] getCookies() {
- return (Cookie[]) cookies.toArray(new Cookie[cookies.size()]);
+ return cookies.toArray(new Cookie[cookies.size()]);
}
public boolean containsHeader(String name) {

Back to the top