Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2011-01-07 21:52:44 +0000
committerChris Goldthorpe2011-01-07 21:52:44 +0000
commitb2ddf5fde6e8ccc830e87f57b46a235acf5789da (patch)
treed1952299a96bad5e221b95be8ead24fa72febaa5 /org.eclipse.ua.tests
parent2b9bd58646052370e563961d4607093758dc6ab3 (diff)
downloadeclipse.platform.ua-b2ddf5fde6e8ccc830e87f57b46a235acf5789da.tar.gz
eclipse.platform.ua-b2ddf5fde6e8ccc830e87f57b46a235acf5789da.tar.xz
eclipse.platform.ua-b2ddf5fde6e8ccc830e87f57b46a235acf5789da.zip
Fix warnings when compiled with Java 5.0
Diffstat (limited to 'org.eclipse.ua.tests')
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContextServletTest.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/IndexServletTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadIndexUsingRemoteHelp.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockSearchServlet.java4
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchServletTest.java6
-rwxr-xr-xorg.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchServletTest.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocManagerTest.java4
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocServletTest.java6
8 files changed, 24 insertions, 24 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContextServletTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContextServletTest.java
index 2ca6a4baf..917cfd653 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContextServletTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContextServletTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -97,7 +97,7 @@ public class ContextServletTest extends TestCase {
is.close();
assertEquals("context", root.getNodeName());
NodeList children = root.getChildNodes();
- List topics = new ArrayList();
+ List<Node> topics = new ArrayList<Node>();
int length = children.getLength();
for (int i = 0; i < length; i++) {
Node next = children.item(i);
@@ -105,7 +105,7 @@ public class ContextServletTest extends TestCase {
topics.add(next);
}
}
- return (Element[]) topics.toArray(new Element[topics.size()]);
+ return topics.toArray(new Element[topics.size()]);
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/IndexServletTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/IndexServletTest.java
index 67c0494a6..ca9e0f40f 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/IndexServletTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/IndexServletTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -102,7 +102,7 @@ public class IndexServletTest extends TestCase {
private Element[] findEntryInAllContributions(Node parent, String keyword) {
NodeList contributions = parent.getChildNodes();
- List results = new ArrayList();
+ List<Node> results = new ArrayList<Node>();
for (int i = 0; i < contributions.getLength(); i++) {
Node next = contributions.item(i);
if (next instanceof Element) {
@@ -112,11 +112,11 @@ public class IndexServletTest extends TestCase {
}
}
}
- return (Element[]) results.toArray(new Element[results.size()]);
+ return results.toArray(new Element[results.size()]);
}
private void findEntryInIndexContribution(Element parent, String keyword,
- List results) {
+ List<Node> results) {
NodeList indexes = parent.getChildNodes();
for (int i = 0; i < indexes.getLength(); i++) {
Node next = indexes.item(i);
@@ -130,7 +130,7 @@ public class IndexServletTest extends TestCase {
}
private void findMatchingChildEntry(Element parent, String keyword,
- List results) {
+ List<Node> results) {
NodeList topLevelEntries = parent.getChildNodes();
for (int i = 0; i < topLevelEntries.getLength(); i++) {
Node next = topLevelEntries.item(i);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadIndexUsingRemoteHelp.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadIndexUsingRemoteHelp.java
index 51c6cba14..7715a6982 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadIndexUsingRemoteHelp.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadIndexUsingRemoteHelp.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -70,14 +70,14 @@ public class LoadIndexUsingRemoteHelp extends TestCase {
}
private IIndexEntry[] matchingEntries(IIndex index, String keyword) {
- List matches = new ArrayList();
+ List<IIndexEntry> matches = new ArrayList<IIndexEntry>();
IIndexEntry[] entries = index.getEntries();
for (int i = 0; i < entries.length; i++) {
if (keyword.equals(entries[i].getKeyword())) {
matches.add(entries[i]);
}
}
- return (IIndexEntry[]) matches.toArray(new IIndexEntry[matches.size()]);
+ return matches.toArray(new IIndexEntry[matches.size()]);
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockSearchServlet.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockSearchServlet.java
index 2356a0c53..e38d6227c 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockSearchServlet.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockSearchServlet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -34,7 +34,7 @@ public class MockSearchServlet extends HttpServlet {
String locale = UrlUtil.getLocale(req, resp);
req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
resp.setContentType("application/xml; charset=UTF-8"); //$NON-NLS-1$
- List results = new ArrayList();
+ List<SearchHit> results = new ArrayList<SearchHit>();
if (isSearchHit(phrase, locale)) {
SearchHit hit = new SearchHit("http://www.eclipse.org",
"Hit from Mock Servlet",
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchServletTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchServletTest.java
index 3649b1750..e8219d8dc 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchServletTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchServletTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 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
@@ -114,7 +114,7 @@ public class ParallelSearchServletTest extends TestCase {
is.close();
assertEquals("searchHits", root.getNodeName());
NodeList children = root.getChildNodes();
- List hits = new ArrayList();
+ List<Node> hits = new ArrayList<Node>();
int length = children.getLength();
for (int i = 0; i < length; i++) {
Node next = children.item(i);
@@ -122,7 +122,7 @@ public class ParallelSearchServletTest extends TestCase {
hits.add(next);
}
}
- return (Node[]) hits.toArray(new Node[hits.size()]);
+ return hits.toArray(new Node[hits.size()]);
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchServletTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchServletTest.java
index d819c72b6..b2eaf5d99 100755
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchServletTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchServletTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -124,7 +124,7 @@ public class SearchServletTest extends TestCase {
is.close();
assertEquals("searchHits", root.getNodeName());
NodeList children = root.getChildNodes();
- List hits = new ArrayList();
+ List<Node> hits = new ArrayList<Node>();
int length = children.getLength();
for (int i = 0; i < length; i++) {
Node next = children.item(i);
@@ -132,7 +132,7 @@ public class SearchServletTest extends TestCase {
hits.add(next);
}
}
- return (Node[]) hits.toArray(new Node[hits.size()]);
+ return hits.toArray(new Node[hits.size()]);
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocManagerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocManagerTest.java
index 3e028c003..31b829c01 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocManagerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocManagerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -93,7 +93,7 @@ public class TocManagerTest extends TestCase {
public static boolean hasDuplicateContributions(TocContribution[] tocContributions)
{
- HashSet contributionsFound = new HashSet();
+ HashSet<String> contributionsFound = new HashSet<String>();
for(int i=0;i<tocContributions.length;i++)
{
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocServletTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocServletTest.java
index c95c89628..fda5de956 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocServletTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocServletTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -95,7 +95,7 @@ public class TocServletTest extends TestCase {
private Element[] findChildren(Node parent, String childKind, String attributeName, String attributeValue) {
NodeList contributions = parent.getChildNodes();
- List results = new ArrayList();
+ List<Node> results = new ArrayList<Node>();
for (int i = 0; i < contributions.getLength(); i++) {
Node next = contributions.item(i);
if (next instanceof Element) {
@@ -106,7 +106,7 @@ public class TocServletTest extends TestCase {
}
}
}
- return (Element[]) results.toArray(new Element[results.size()]);
+ return results.toArray(new Element[results.size()]);
}

Back to the top