diff options
author | Chris Goldthorpe | 2011-01-10 17:26:20 +0000 |
---|---|---|
committer | Chris Goldthorpe | 2011-01-10 17:26:20 +0000 |
commit | 85eef60a73c3638dfacfc953bd61e2ea9e9d67f9 (patch) | |
tree | cffcbb842301c6ff8e61bee6a98f8aff8eb04257 /org.eclipse.ua.tests/intro/org/eclipse | |
parent | f0510ca738a6d11139b1251140ea001d550a3555 (diff) | |
download | eclipse.platform.ua-85eef60a73c3638dfacfc953bd61e2ea9e9d67f9.tar.gz eclipse.platform.ua-85eef60a73c3638dfacfc953bd61e2ea9e9d67f9.tar.xz eclipse.platform.ua-85eef60a73c3638dfacfc953bd61e2ea9e9d67f9.zip |
Fix warnings when compiled with Java 5.0
Diffstat (limited to 'org.eclipse.ua.tests/intro/org/eclipse')
4 files changed, 16 insertions, 12 deletions
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/anchors/ExtensionReorderingTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/anchors/ExtensionReorderingTest.java index 2996006f6..9f1cdb198 100644 --- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/anchors/ExtensionReorderingTest.java +++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/anchors/ExtensionReorderingTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 IBM Corporation and others. + * Copyright (c) 2007, 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 @@ -148,7 +148,7 @@ public class ExtensionReorderingTest extends TestCase { String attributeValue) { // find all configs with given attribute and attribute value. - Vector elements = new Vector(); + Vector<IConfigurationElement> elements = new Vector<IConfigurationElement>(); for (int i = 0; i < configElements.length; i++) { String currentAttributeValue = configElements[i] .getAttribute(attributeName); diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/contentdetect/ContentDetectorTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/contentdetect/ContentDetectorTest.java index 06073343f..bb2e61571 100644 --- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/contentdetect/ContentDetectorTest.java +++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/contentdetect/ContentDetectorTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 IBM Corporation and others. + * Copyright (c) 2007, 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,18 +34,19 @@ public class ContentDetectorTest extends TestCase { public void testContributorSaveNoNames() { ContentDetectHelper helper = new ContentDetectHelper(); - helper.saveContributors(new HashSet()); + helper.saveContributors(new HashSet<String>()); assertTrue(helper.getContributors().size() == 0); } public void testContributorSaveThreeContributors() { ContentDetectHelper helper = new ContentDetectHelper(); - HashSet contributors = new HashSet(); + HashSet<String> contributors = new HashSet<String>(); contributors.add("one"); contributors.add("two"); contributors.add("three"); helper.saveContributors(contributors); - Set savedContributors = helper.getContributors(); + @SuppressWarnings("unchecked") + Set<String> savedContributors = helper.getContributors(); assertTrue(savedContributors.size() == 3); assertTrue(savedContributors.contains("one")); assertTrue(savedContributors.contains("two")); @@ -54,12 +55,12 @@ public class ContentDetectorTest extends TestCase { public void testForNewContent() { ContentDetectHelper helper = new ContentDetectHelper(); - HashSet contributors = new HashSet(); + HashSet<String> contributors = new HashSet<String>(); contributors.add("one"); contributors.add("two"); contributors.add("three"); contributors.add("four"); - Set previous = new HashSet(); + Set<String> previous = new HashSet<String>(); previous.add("five"); previous.add("two"); previous.add("one"); @@ -95,8 +96,9 @@ public class ContentDetectorTest extends TestCase { assertFalse(detector.isNewContentAvailable()); // Make the first extension appear new helper.saveExtensionCount(extensionCount - 1); - Set contributors = helper.getContributors(); - String firstContribution = (String) contributors.iterator().next(); + @SuppressWarnings("unchecked") + Set<String> contributors = helper.getContributors(); + String firstContribution = contributors.iterator().next(); String copyOfFirstContribution = "" + firstContribution; contributors.remove(firstContribution); helper.saveContributors(contributors); diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java index 4ec87be3d..8f449f3dc 100644 --- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java +++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 IBM Corporation and others. + * Copyright (c) 2004, 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 @@ -104,7 +104,8 @@ public class IntroModelSerializer { printPageStyles(rootPage, text); } - private void printPageStyles(AbstractIntroPage page, StringBuffer text) { + @SuppressWarnings("unchecked") + private void printPageStyles(AbstractIntroPage page, StringBuffer text) { text.append("\n\tpage styles are = "); //$NON-NLS-1$ String[] styles = page.getStyles(); for (int i = 0; i < styles.length; i++) diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java index 1aef09a72..417505d8b 100644 --- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java +++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java @@ -121,6 +121,7 @@ public class IntroModelSerializerTest extends TestCase { * mapping of filenames relative to the test plugin to Strings, the * contents of the XHTML files. */ + @SuppressWarnings("unchecked") public static Map getXHTMLFiles(IntroModelRoot model) { Map map = new HashMap(); Collection<AbstractIntroPage> pages = new ArrayList<AbstractIntroPage>(); |