From f0510ca738a6d11139b1251140ea001d550a3555 Mon Sep 17 00:00:00 2001 From: Chris Goldthorpe Date: Fri, 7 Jan 2011 22:03:53 +0000 Subject: Fix warnings when compiled with Java 5.0 --- .../ua/tests/help/criteria/SampleCriteriaProvider.java | 6 +++--- .../help/org/eclipse/ua/tests/help/other/UserContext.java | 6 +++--- .../ua/tests/help/other/UserCriteriaDefinition.java | 6 +++--- .../ua/tests/help/other/UserCriterionDefinition.java | 6 +++--- .../help/org/eclipse/ua/tests/help/other/UserIndex.java | 6 +++--- .../org/eclipse/ua/tests/help/other/UserIndexEntry.java | 14 +++++++------- .../help/org/eclipse/ua/tests/help/other/UserIndexSee.java | 6 +++--- .../help/org/eclipse/ua/tests/help/other/UserToc.java | 6 +++--- .../help/org/eclipse/ua/tests/help/other/UserToc2.java | 6 +++--- .../help/org/eclipse/ua/tests/help/other/UserTopic.java | 6 +++--- .../help/org/eclipse/ua/tests/help/other/UserTopic2.java | 6 +++--- .../tests/help/performance/TocAssemblePerformanceTest.java | 6 +++--- 12 files changed, 40 insertions(+), 40 deletions(-) (limited to 'org.eclipse.ua.tests/help/org') diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/SampleCriteriaProvider.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/SampleCriteriaProvider.java index 82d73d366..8e81967bb 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/SampleCriteriaProvider.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/SampleCriteriaProvider.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 @@ -32,7 +32,7 @@ public class SampleCriteriaProvider extends AbstractCriteriaProvider { } private UserCriteria[] getCriteriaFromLabel(String label) { - List criteria = new ArrayList(); + List criteria = new ArrayList(); if (label == null) { return new UserCriteria[0]; } @@ -48,7 +48,7 @@ public class SampleCriteriaProvider extends AbstractCriteriaProvider { if (label.toLowerCase().indexOf('c') >= 0) { criteria.add( new UserCriteria(CONTAINS_LETTER, "c", true) ); } - return (UserCriteria[]) criteria.toArray(new UserCriteria[criteria.size()]); + return criteria.toArray(new UserCriteria[criteria.size()]); } } diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserContext.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserContext.java index 4a3344adf..2f5e7113d 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserContext.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserContext.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 @@ -27,7 +27,7 @@ public class UserContext implements IContext3 { private String title; private String text; - private List children = new ArrayList(); + private List children = new ArrayList(); public UserContext(String title, String text) { this.title = title; @@ -51,7 +51,7 @@ public class UserContext implements IContext3 { } public IHelpResource[] getRelatedTopics() { - return (IHelpResource[])children.toArray(new IHelpResource[0]); + return children.toArray(new IHelpResource[0]); } public String getText() { diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriteriaDefinition.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriteriaDefinition.java index 40768002f..6bb087f80 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriteriaDefinition.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriteriaDefinition.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 @@ -21,14 +21,14 @@ import org.eclipse.help.IUAElement; public class UserCriteriaDefinition implements ICriteriaDefinition { - private List children = new ArrayList(); + private List children = new ArrayList(); public boolean isEnabled(IEvaluationContext context) { return true; } public ICriterionDefinition[] getCriterionDefinitions() { - return (ICriterionDefinition[]) children.toArray(new ICriterionDefinition[0]); + return children.toArray(new ICriterionDefinition[0]); } public void addDefinition(ICriterionDefinition definition) { diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionDefinition.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionDefinition.java index 3f2160490..3fe7a1bd8 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionDefinition.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionDefinition.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 @@ -23,7 +23,7 @@ public class UserCriterionDefinition implements ICriterionDefinition { private String id; private String name; - private List children = new ArrayList(); + private List children = new ArrayList(); public UserCriterionDefinition(String id, String name) { this.id = id; @@ -55,7 +55,7 @@ public class UserCriterionDefinition implements ICriterionDefinition { } public ICriterionValueDefinition[] getCriterionValueDefinitions() { - return (ICriterionValueDefinition[]) children.toArray(new ICriterionValueDefinition[0]); + return children.toArray(new ICriterionValueDefinition[0]); } public void addValue(ICriterionValueDefinition value) { diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndex.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndex.java index 51f28af2d..ff1cea384 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndex.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndex.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 @@ -25,7 +25,7 @@ import org.eclipse.help.IUAElement; public class UserIndex implements IIndex { - private List entries = new ArrayList(); + private List entries = new ArrayList(); private boolean enabled; public UserIndex(boolean enabled) { @@ -41,7 +41,7 @@ public class UserIndex implements IIndex { } public IIndexEntry[] getEntries() { - return (IIndexEntry[])entries.toArray(new IIndexEntry[0]); + return entries.toArray(new IIndexEntry[0]); } public boolean isEnabled(IEvaluationContext context) { diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndexEntry.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndexEntry.java index e6596e121..153cb0d73 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndexEntry.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndexEntry.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 @@ -27,9 +27,9 @@ import org.eclipse.help.IUAElement; public class UserIndexEntry implements IIndexEntry2 { - private List subentries = new ArrayList(); - private List sees = new ArrayList(); - private List topics = new ArrayList(); + private List subentries = new ArrayList(); + private List sees = new ArrayList(); + private List topics = new ArrayList(); private boolean isEnabled; private String keyword; @@ -66,7 +66,7 @@ public class UserIndexEntry implements IIndexEntry2 { } public IIndexSee[] getSees() { - return (IIndexSee[])sees.toArray(new IIndexSee[0]); + return sees.toArray(new IIndexSee[0]); } public String getKeyword() { @@ -74,11 +74,11 @@ public class UserIndexEntry implements IIndexEntry2 { } public IIndexEntry[] getSubentries() { - return (IIndexEntry[])subentries.toArray(new IIndexEntry[0]); + return subentries.toArray(new IIndexEntry[0]); } public ITopic[] getTopics() { - return (ITopic[])topics.toArray(new ITopic[0]); + return topics.toArray(new ITopic[0]); } } diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndexSee.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndexSee.java index 7b45e9d29..e6dbbba13 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndexSee.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserIndexSee.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 @@ -21,7 +21,7 @@ import org.eclipse.help.IUAElement; public class UserIndexSee implements IIndexSee { - private List children = new ArrayList(); + private List children = new ArrayList(); private boolean isEnabled; private String keyword; @@ -47,7 +47,7 @@ public class UserIndexSee implements IIndexSee { } public IIndexSubpath[] getSubpathElements() { - return (IIndexSubpath[])children.toArray(new IIndexSubpath[0]); + return children.toArray(new IIndexSubpath[0]); } public boolean isSeeAlso() { diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserToc.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserToc.java index 954fa9fed..4b88be2c3 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserToc.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserToc.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 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 @@ -20,7 +20,7 @@ import org.eclipse.help.IUAElement; public class UserToc implements IToc { - private List children = new ArrayList(); + private List children = new ArrayList(); private boolean isEnabled; private String href; private String label; @@ -39,7 +39,7 @@ public class UserToc implements IToc { } public ITopic[] getTopics() { - return (ITopic[])children.toArray(new ITopic[0]); + return children.toArray(new ITopic[0]); } public IUAElement[] getChildren() { diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserToc2.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserToc2.java index c352d7ffc..5ba01f56e 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserToc2.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserToc2.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 @@ -24,7 +24,7 @@ public class UserToc2 extends UserToc implements IToc2 { super(label, href, isEnabled); } - private List criteria = new ArrayList(); + private List criteria = new ArrayList(); public IUAElement[] getChildren() { IUAElement[] criteriaElements = getCriteria(); @@ -40,7 +40,7 @@ public class UserToc2 extends UserToc implements IToc2 { } public ICriteria[] getCriteria() { - return (ICriteria[])criteria.toArray(new ICriteria[0]); + return criteria.toArray(new ICriteria[0]); } public String getIcon() { diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserTopic.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserTopic.java index 1aeee7888..a73a93610 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserTopic.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserTopic.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 @@ -24,13 +24,13 @@ import org.eclipse.help.IUAElement; public class UserTopic implements ITopic { - private List children = new ArrayList(); + private List children = new ArrayList(); private boolean isEnabled; private String href; private String label; public ITopic[] getSubtopics() { - return (ITopic[])children.toArray(new ITopic[0]); + return children.toArray(new ITopic[0]); } public IUAElement[] getChildren() { diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserTopic2.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserTopic2.java index d7488ef8a..a7aeb1ce4 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserTopic2.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserTopic2.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 @@ -20,7 +20,7 @@ import org.eclipse.help.IUAElement; public class UserTopic2 extends UserTopic implements ITopic2 { - private List criteria = new ArrayList(); + private List criteria = new ArrayList(); public IUAElement[] getChildren() { IUAElement[] criteriaElements = getCriteria(); @@ -40,7 +40,7 @@ public class UserTopic2 extends UserTopic implements ITopic2 { } public ICriteria[] getCriteria() { - return (ICriteria[])criteria.toArray(new ICriteria[0]); + return criteria.toArray(new ICriteria[0]); } public String getIcon() { diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java index 892c7fbac..4f0eb5d0f 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 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 @@ -50,7 +50,7 @@ public class TocAssemblePerformanceTest extends PerformanceTestCase { public void assembleToc() throws Exception { TocFileParser parser = new TocFileParser(); - List contributions = new ArrayList(); + List contributions = new ArrayList(); contributions.add(parse(parser, "data/help/performance/org.eclipse.jdt.doc.isv/jdttoc.xml")); contributions.add(parse(parser, "data/help/performance/org.eclipse.jdt.doc.isv/topics_Guide.xml")); contributions.add(parse(parser, "data/help/performance/org.eclipse.jdt.doc.isv/topics_Porting.xml")); @@ -61,7 +61,7 @@ public class TocAssemblePerformanceTest extends PerformanceTestCase { TocAssembler assembler = new TocAssembler(); contributions = assembler.assemble(contributions); assertEquals(1, contributions.size()); - TocContribution toc = (TocContribution)contributions.get(0); + TocContribution toc = contributions.get(0); assertEquals(101, countTopics(toc.getToc().getTopics())); } -- cgit v1.2.3