diff options
author | Chris Goldthorpe | 2011-01-07 21:24:52 +0000 |
---|---|---|
committer | Chris Goldthorpe | 2011-01-07 21:24:52 +0000 |
commit | 70b0e0aa5d7848b81d2d61c64af932830a8d54f6 (patch) | |
tree | 40e5f61adfa7c0119b45439ca6853eb721c5dc84 /org.eclipse.ua.tests | |
parent | 24cc4393cffba154963666534eebed84021f4d1d (diff) | |
download | eclipse.platform.ua-70b0e0aa5d7848b81d2d61c64af932830a8d54f6.tar.gz eclipse.platform.ua-70b0e0aa5d7848b81d2d61c64af932830a8d54f6.tar.xz eclipse.platform.ua-70b0e0aa5d7848b81d2d61c64af932830a8d54f6.zip |
Fix warnings when compiled with Java 5.0
Diffstat (limited to 'org.eclipse.ua.tests')
3 files changed, 22 insertions, 22 deletions
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java index 8b28368ee..21e1e1f98 100644 --- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java +++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.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 @@ -136,7 +136,7 @@ public class TestPersistence extends TestCase { */ public void testSaveLayoutData() { createCompositeCheatSheet(); - Map values = new Hashtable(); + Map<String, String> values = new Hashtable<String, String>(); values.put("One", "1"); values.put("Two", "2"); helper.saveCompositeState(model, values); diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java index eb8b4deae..7b2a19e2a 100644 --- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java +++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.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 @@ -36,13 +36,13 @@ public class TestTaskEvents extends TestCase { public class TaskMap { - private Map map = new HashMap(); + private Map<String, TaskCounter> map = new HashMap<String, TaskCounter>(); private int eventCount = 0; public void put(ICompositeCheatSheetTask task) { final String id = task.getId(); if (map.containsKey(id)) { - ((TaskCounter)map.get(id)).incrementCount(); + map.get(id).incrementCount(); } else { map.put(id, new TaskCounter()); } @@ -52,7 +52,7 @@ public class TestTaskEvents extends TestCase { public int getEventCount(ICompositeCheatSheetTask task) { final String id = task.getId(); if (map.containsKey(id)) { - return ((TaskCounter)map.get(id)).getCount(); + return map.get(id).getCount(); } else { return 0; } diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestStatePersistence.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestStatePersistence.java index 45b72f2d9..b66ba03cc 100644 --- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestStatePersistence.java +++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestStatePersistence.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 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 @@ -41,11 +41,11 @@ public class TestStatePersistence extends TestCase { public int currentItem; public int button; public String contentPath; - public List completed; - public List expanded; - public List expandRestore; - public Hashtable subItemCompleted; - public Hashtable subItemSkipped; + public List<String> completed; + public List<String> expanded; + public List<String> expandRestore; + public Hashtable<String, String> subItemCompleted; + public Hashtable<String, String> subItemSkipped; public CheatSheetManager manager; } @@ -63,11 +63,11 @@ public class TestStatePersistence extends TestCase { propsToSave.currentItem = 2; propsToSave.id = TEST_ID; propsToSave.contentPath = PATH; - propsToSave.completed = new ArrayList(); - propsToSave.expanded = new ArrayList(); - propsToSave.expandRestore = new ArrayList(); - propsToSave.subItemCompleted = new Hashtable(); - propsToSave.subItemSkipped = new Hashtable(); + propsToSave.completed = new ArrayList<String>(); + propsToSave.expanded = new ArrayList<String>(); + propsToSave.expandRestore = new ArrayList<String>(); + propsToSave.subItemCompleted = new Hashtable<String, String>(); + propsToSave.subItemSkipped = new Hashtable<String, String>(); CheatSheetElement csElement = new CheatSheetElement(TEST_ID); propsToSave.manager = new CheatSheetManager(csElement); } @@ -98,12 +98,12 @@ public class TestStatePersistence extends TestCase { result.id = (String)restored.getProperty(IParserTags.ID); result.button = Integer.parseInt(restored.getProperty(IParserTags.BUTTON)); result.currentItem = Integer.parseInt(restored.getProperty(IParserTags.CURRENT)); - result.completed = (ArrayList) restored.get(IParserTags.COMPLETED); + result.completed = (ArrayList<String>) restored.get(IParserTags.COMPLETED); result.contentPath = (String) restored.get(IParserTags.CONTENT_URL); - result.expanded = (ArrayList) restored.get(IParserTags.EXPANDED); - result.expandRestore = (ArrayList) restored.get(IParserTags.EXPANDRESTORE); - result.subItemCompleted = (Hashtable) restored.get(IParserTags.SUBITEMCOMPLETED); - result.subItemSkipped = (Hashtable) restored.get(IParserTags.SUBITEMSKIPPED); + result.expanded = (ArrayList<String>) restored.get(IParserTags.EXPANDED); + result.expandRestore = (ArrayList<String>) restored.get(IParserTags.EXPANDRESTORE); + result.subItemCompleted = (Hashtable<String, String>) restored.get(IParserTags.SUBITEMCOMPLETED); + result.subItemSkipped = (Hashtable<String, String>) restored.get(IParserTags.SUBITEMSKIPPED); Hashtable managerData = (Hashtable) restored.get(IParserTags.MANAGERDATA); CheatSheetElement csElement = new CheatSheetElement(id); result.manager = new CheatSheetManager(csElement); |