Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOfflineTaskHandler.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java1
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java3
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotification.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListColorsAndFonts.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractBugEditorInput.java1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java5
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.java1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/MylarTaskEditor.java5
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInput.java1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskFormPage.java3
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/ResetRepositoryConfigurationAction.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityView.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java8
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDragSourceListener.java7
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java2
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java10
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java38
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java5
25 files changed, 68 insertions, 49 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOfflineTaskHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOfflineTaskHandler.java
index 224467d0a..884122d8f 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOfflineTaskHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOfflineTaskHandler.java
@@ -149,10 +149,10 @@ public class BugzillaOfflineTaskHandler implements IOfflineTaskHandler {
urlQueryString = new String(urlQueryBase + BUG_ID);
int queryCounter = -1;
- Iterator itr = tasks.iterator();
+ Iterator<AbstractRepositoryTask> itr = tasks.iterator();
while (itr.hasNext()) {
queryCounter++;
- ITask task = (ITask) itr.next();
+ ITask task = itr.next();
String newurlQueryString = URLEncoder.encode(AbstractRepositoryTask.getTaskId(task.getHandleIdentifier())
+ ",", repository.getCharacterEncoding());
if ((urlQueryString.length() + newurlQueryString.length() + IBugzillaConstants.CONTENT_TYPE_RDF.length()) > MAX_URL_LENGTH) {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
index 2955ea950..5d5e9c0dc 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
@@ -77,6 +77,7 @@ public class BugzillaTaskEditorInput extends ExistingBugEditorInput {
return bugTitle;
}
+ @SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
return null;
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
index af430c4ec..0bfdeff63 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
@@ -167,7 +167,8 @@ public class TaskRepository {
}
}
- private Map getAuthInfo() {
+ @SuppressWarnings("unchecked")
+ private Map<String, String> getAuthInfo() {
try {
return Platform.getAuthorizationInfo(new URL(getUrl()), AUTH_REALM, AUTH_SCHEME);
} catch (MalformedURLException ex) {
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java
index 1e1b30a46..d9544d126 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java
@@ -192,9 +192,9 @@ public class TaskRepositoryManager {
return repository;
}
} else {
- Collection values = repositoryMap.values();
+ Collection<Set<TaskRepository>> values = repositoryMap.values();
if (!values.isEmpty()) {
- HashSet repoistorySet = (HashSet) values.iterator().next();
+ Set<TaskRepository> repoistorySet = values.iterator().next();
return (TaskRepository) repoistorySet.iterator().next();
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotification.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotification.java
index 46bd19d9f..a1101b8eb 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotification.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotification.java
@@ -18,7 +18,7 @@ import org.eclipse.swt.graphics.Image;
/**
* @author Rob Elves
*/
-public interface ITaskListNotification extends Comparable {
+public interface ITaskListNotification {
public void openTask();
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListColorsAndFonts.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListColorsAndFonts.java
index 062867edb..d3b2ecf61 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListColorsAndFonts.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListColorsAndFonts.java
@@ -61,11 +61,11 @@ public class TaskListColorsAndFonts {
FontData data = new FontData(defaultData[0].getName(), defaultData[0].getHeight(), defaultData[0]
.getStyle());
- // NOTE: Windowx XP only, for: data.data.lfStrikeOut = 1;
+ // NOTE: Windows XP only, for: data.data.lfStrikeOut = 1;
try {
Field dataField = data.getClass().getDeclaredField("data");
Object dataObject = dataField.get(data);
- Class clazz = dataObject.getClass().getSuperclass();
+ Class<?> clazz = dataObject.getClass().getSuperclass();
Field strikeOutFiled = clazz.getDeclaredField("lfStrikeOut");
strikeOutFiled.set(dataObject, (byte) 1);
STRIKETHROUGH = new Font(Display.getCurrent(), data);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java
index 2a003b7ba..393e4483f 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java
@@ -35,6 +35,7 @@ public class OpenWithBrowserAction extends BaseSelectionListenerAction {
setId(ID);
}
+ @SuppressWarnings("unchecked")
@Override
public void run() {
if (super.getStructuredSelection() != null) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractBugEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractBugEditorInput.java
index 6afe05d36..c81154ec3 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractBugEditorInput.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractBugEditorInput.java
@@ -72,6 +72,7 @@ public abstract class AbstractBugEditorInput implements IEditorInput {
return toolTipText;
}
+ @SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
return null;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java
index d3e5046dc..f5525c229 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java
@@ -1865,8 +1865,13 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
private RepositoryTaskOutlinePage outlinePage = null;
+ @SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
+ return getAdapterDelgate(adapter);
+ }
+
+ public Object getAdapterDelgate(Class<?> adapter) {
if (IContentOutlinePage.class.equals(adapter)) {
if (outlinePage == null && editorInput != null) {
outlinePage = new RepositoryTaskOutlinePage(taskOutlineModel);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.java
index 83b5b81ef..8c7108b35 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.java
@@ -48,6 +48,7 @@ public class CategoryEditorInput implements IEditorInput {
return "Category Editor";
}
+ @SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
return null;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/MylarTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/MylarTaskEditor.java
index 59f071eae..1d7c1770b 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/MylarTaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/MylarTaskEditor.java
@@ -92,8 +92,13 @@ public class MylarTaskEditor extends FormEditor {
return (TaskEditorActionContributor) getEditorSite().getActionBarContributor();
}
+ @SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
+ return getAdapterDelgate(adapter);
+ }
+
+ public Object getAdapterDelgate(Class<?> adapter) {
// TODO: consider adding: IContentOutlinePage.class.equals(adapter) &&
if (contentOutlineProvider != null) {
return contentOutlineProvider.getAdapter(adapter);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInput.java
index e71b60aa2..5bc902f21 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInput.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInput.java
@@ -101,6 +101,7 @@ public class TaskEditorInput implements IEditorInput, IPersistableElement {
*
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
+ @SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
if (adapter == IEditorInput.class) {
return this;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskFormPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskFormPage.java
index ad06077d3..762a6be89 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskFormPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskFormPage.java
@@ -525,6 +525,7 @@ public class TaskFormPage extends FormPage {
this.fAnnotationModel = model;
}
+ @SuppressWarnings("unchecked")
public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
Iterator ite = fAnnotationModel.getAnnotationIterator();
@@ -616,6 +617,7 @@ public class TaskFormPage extends FormPage {
// From org.eclipse.ui.internal.editors.text.SharedTextColors
static class SharedTextColors implements ISharedTextColors {
/** The display table. */
+ @SuppressWarnings("unchecked")
private Map fDisplayTable;
/** Creates an returns a shared color manager. */
@@ -654,6 +656,7 @@ public class TaskFormPage extends FormPage {
/*
* @see ISharedTextColors#dispose()
*/
+ @SuppressWarnings("unchecked")
public void dispose() {
if (fDisplayTable != null) {
Iterator j = fDisplayTable.values().iterator();
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java
index 72aed3785..1a50fd939 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java
@@ -89,6 +89,7 @@ public class TaskSpellingReconcileStrategy implements IReconcilerExtension, IRec
/*
* @see org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector#endCollecting()
*/
+ @SuppressWarnings("unchecked")
public void endCollecting() {
List<Annotation> removeAnnotations = new ArrayList<Annotation>();
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java
index 7f68e94e0..6296f3d22 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java
@@ -98,6 +98,7 @@ public class TaskActivityEditorInput implements IEditorInput {
return "Task Planner";
}
+ @SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
return null;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/ResetRepositoryConfigurationAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/ResetRepositoryConfigurationAction.java
index 6a72965fc..8827bf8f9 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/ResetRepositoryConfigurationAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/ResetRepositoryConfigurationAction.java
@@ -47,7 +47,7 @@ public class ResetRepositoryConfigurationAction extends Action {
public void run() {
try {
IStructuredSelection selection = (IStructuredSelection) repositoriesView.getViewer().getSelection();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
+ for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
Object selectedObject = iter.next();
if (selectedObject instanceof TaskRepository) {
final TaskRepository repository = (TaskRepository) selectedObject;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityView.java
index d820fe04c..0974776a4 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityView.java
@@ -341,7 +341,7 @@ public class TaskActivityView extends ViewPart {
return false;
}
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
+ for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
Object selectedObject = iter.next();
ITask task = null;
if (selectedObject instanceof ITask) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java
index b77ee4c72..453aa4cfd 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java
@@ -7,13 +7,13 @@ import java.util.regex.Pattern;
/**
* @author Eugene Kuleshov (https://bugs.eclipse.org/bugs/show_bug.cgi?id=129511)
*/
-public class TaskKeyComparator implements Comparator {
+public class TaskKeyComparator implements Comparator<String> {
public static final Pattern PATTERN = Pattern.compile("(?:([A-Za-z]*[:_\\-]?)(\\d+))?(.*)");
- public int compare(Object o1, Object o2) {
- String[] a1 = split((String) o1);
- String[] a2 = split((String) o2);
+ public int compare(String o1, String o2) {
+ String[] a1 = split(o1);
+ String[] a2 = split(o2);
String s1 = a1[0];
String s2 = a2[0];
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDragSourceListener.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDragSourceListener.java
index b6a7cf186..5add2f08e 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDragSourceListener.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDragSourceListener.java
@@ -60,7 +60,7 @@ class TaskListDragSourceListener implements DragSourceListener {
}
if (TaskTransfer.getInstance().isSupportedType(event.dataType)) {
List<ITask> tasks = new ArrayList<ITask>();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
+ for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
ITaskListElement element = (ITaskListElement) iter.next();
if (element instanceof ITask) {
tasks.add((ITask)element);
@@ -74,10 +74,7 @@ class TaskListDragSourceListener implements DragSourceListener {
}
} else if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
event.data = CopyDetailsAction.getTextForTask(selectedElement);
- }
-// else {
-// event.data = ID_DATA_TASK_DRAG;
-// }
+ }
}
public void dragFinished(DragSourceEvent event) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
index 2d3e5cd40..289f32390 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
@@ -1044,7 +1044,7 @@ public class TaskListView extends ViewPart {
element = (ITaskListElement) firstSelectedObject;
}
List<ITaskListElement> selectedElements = new ArrayList<ITaskListElement>();
- for (Iterator i = ((IStructuredSelection) getViewer().getSelection()).iterator(); i.hasNext();) {
+ for (Iterator<?> i = ((IStructuredSelection) getViewer().getSelection()).iterator(); i.hasNext();) {
Object object = i.next();
if (object instanceof ITaskListElement) {
selectedElements.add((ITaskListElement) object);
@@ -1543,7 +1543,7 @@ public class TaskListView extends ViewPart {
if (element instanceof AbstractTaskContainer
&& !((AbstractTaskContainer) element).equals(TasksUiPlugin.getTaskListManager()
.getTaskList().getArchiveContainer())) {
- List visibleElements = Arrays.asList(getViewer().getVisibleExpandedElements());
+ List<?> visibleElements = Arrays.asList(getViewer().getVisibleExpandedElements());
if (!visibleElements.contains(element)) {
getViewer().refresh();
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java
index cf9ee24b1..2a79fc12d 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java
@@ -122,7 +122,7 @@ public class TaskDataImportWizard extends Wizard implements IImportWizard {
return false;
}
- Enumeration entries;
+ Enumeration<? extends ZipEntry> entries;
ZipFile zipFile;
try {
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java
index e2423fe07..206daf8c1 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java
@@ -121,7 +121,7 @@ public class TracXmlRpcClient extends AbstractTracClient {
private void checkForException(Object result) throws NumberFormatException, XmlRpcException {
if (result instanceof Map) {
- Map exceptionData = (Map) result;
+ Map<?, ?> exceptionData = (Map<?, ?>) result;
if (exceptionData.containsKey("faultCode") && exceptionData.containsKey("faultString")) {
throw new XmlRpcException(Integer.parseInt(exceptionData.get("faultCode").toString()),
(String) exceptionData.get("faultString"));
@@ -246,7 +246,7 @@ public class TracXmlRpcClient extends AbstractTracClient {
TracTicket ticket = new TracTicket((Integer) ticketResult[0]);
ticket.setCreated((Integer) ticketResult[1]);
ticket.setLastChanged((Integer) ticketResult[2]);
- Map attributes = (Map) ticketResult[3];
+ Map<?, ?> attributes = (Map<?, ?>) ticketResult[3];
for (Object key : attributes.keySet()) {
ticket.putValue(key.toString(), attributes.get(key).toString());
}
@@ -334,14 +334,14 @@ public class TracXmlRpcClient extends AbstractTracClient {
throw new OperationCanceledException();
}
- private TracComponent parseComponent(Map result) {
+ private TracComponent parseComponent(Map<?, ?> result) {
TracComponent component = new TracComponent((String) result.get("name"));
component.setOwner((String) result.get("owner"));
component.setDescription((String) result.get("description"));
return component;
}
- private TracMilestone parseMilestone(Map result) {
+ private TracMilestone parseMilestone(Map<?, ?> result) {
TracMilestone milestone = new TracMilestone((String) result.get("name"));
milestone.setCompleted(TracUtils.parseDate((Integer) result.get("completed")));
milestone.setDue(TracUtils.parseDate((Integer) result.get("due")));
@@ -349,7 +349,7 @@ public class TracXmlRpcClient extends AbstractTracClient {
return milestone;
}
- private TracVersion parseVersion(Map result) {
+ private TracVersion parseVersion(Map<?, ?> result) {
TracVersion version = new TracVersion((String) result.get("name"));
version.setTime(TracUtils.parseDate((Integer) result.get("time")));
version.setDescription((String) result.get("description"));
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java
index 95f09995b..7b42074eb 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java
@@ -59,7 +59,7 @@ public abstract class AbstractTracClientSearchTest extends AbstractTracClientTes
protected void assertTicketEquals(Ticket ticket, TracTicket tracTicket) throws Exception {
assertTrue(tracTicket.isValid());
- Map expectedValues = ticket.getValues();
+ Map<?, ?> expectedValues = ticket.getValues();
Map<String, String> values = tracTicket.getValues();
for (String key : values.keySet()) {
assertEquals("Values for key '" + key + "' did not match", expectedValues.get(key), values.get(key));
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
index 1b4001a83..c766efb3b 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
@@ -93,7 +93,7 @@ public class TracXmlRpcTest extends TestCase {
// this.password = password;
}
- private int createTicket(String summary, String description, Map attributes) throws XmlRpcException, IOException {
+ private int createTicket(String summary, String description, Map<String, Object> attributes) throws XmlRpcException, IOException {
int id = (Integer) call("ticket.create", summary, description, attributes);
tickets.add(id);
return id;
@@ -164,7 +164,7 @@ public class TracXmlRpcTest extends TestCase {
try {
assertHasValue((Object[]) call(module + ".getAll"), "foo");
- Map values = (Map) call(module + ".get", "foo");
+ Map<?, ?> values = (Map) call(module + ".get", "foo");
for (String attribute : attributes.keySet()) {
assertEquals(attributes.get(attribute), values.get(attribute));
}
@@ -199,7 +199,7 @@ public class TracXmlRpcTest extends TestCase {
call("ticket.milestone.create", "foo", attributes);
- Map values = (Map) call("ticket.milestone.get", "foo");
+ Map<?, ?> values = (Map) call("ticket.milestone.get", "foo");
assertEquals(new Integer(due), (Integer) values.get("due"));
assertEquals(new Integer(completed), (Integer) values.get("completed"));
@@ -228,7 +228,7 @@ public class TracXmlRpcTest extends TestCase {
} else {
assertTrue((Integer) ticket[2] >= (Integer) ticket[1]);
}
- Map values = (Map) ticket[3];
+ Map<?, ?> values = (Map) ticket[3];
for (String attribute : attributes.keySet()) {
assertEquals(attributes.get(attribute), values.get(attribute));
}
@@ -255,7 +255,7 @@ public class TracXmlRpcTest extends TestCase {
}
try {
- List ticket = (List) call("ticket.get", Integer.MAX_VALUE);
+ List<?> ticket = (List) call("ticket.get", Integer.MAX_VALUE);
fail("Expected XmlRpcException, got ticket instead: " + ticket);
} catch (XmlRpcException e) {
// ignore
@@ -274,7 +274,7 @@ public class TracXmlRpcTest extends TestCase {
}
public void testUpdateTicket() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable());
+ int id = createTicket("summary", "description", new Hashtable<String, Object>());
Map<String, Object> attributes = new Hashtable<String, Object>();
attributes.put("summary", "changed");
@@ -283,7 +283,7 @@ public class TracXmlRpcTest extends TestCase {
attributes.put("description", "description");
Object[] ticket = (Object[]) call("ticket.get", id);
- Map values = (Map) ticket[3];
+ Map<?, ?> values = (Map) ticket[3];
for (String attribute : attributes.keySet()) {
assertEquals(attributes.get(attribute), values.get(attribute));
}
@@ -316,7 +316,7 @@ public class TracXmlRpcTest extends TestCase {
}
public void testGetChangeLog() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable());
+ int id = createTicket("summary", "description", new Hashtable<String, Object>());
Map<String, Object> attributes = new Hashtable<String, Object>();
attributes.put("summary", "changed");
@@ -332,10 +332,10 @@ public class TracXmlRpcTest extends TestCase {
}
public void testMultiGetTicket() throws XmlRpcException, IOException {
- int id1 = createTicket("summary1", "description1", new Hashtable());
- int id2 = createTicket("summary2", "description2", new Hashtable());
+ int id1 = createTicket("summary1", "description1", new Hashtable<String, Object>());
+ int id2 = createTicket("summary2", "description2", new Hashtable<String, Object>());
- List<Map> calls = new ArrayList<Map>();
+ List<Map<?, ?>> calls = new ArrayList<Map<?, ?>>();
calls.add(createMultiCall("ticket.get", id1));
calls.add(createMultiCall("ticket.get", id2));
Object[] ret = (Object[]) call("system.multicall", calls);
@@ -354,7 +354,7 @@ public class TracXmlRpcTest extends TestCase {
}
public void testAttachment() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable());
+ int id = createTicket("summary", "description", new Hashtable<String, Object>());
String filename = (String) call("ticket.putAttachment", id, "attach.txt", "description", "data".getBytes(), true);
// the returned filename may differ, since another ticket may have an
@@ -398,7 +398,7 @@ public class TracXmlRpcTest extends TestCase {
}
public void testDeleteAttachment() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable());
+ int id = createTicket("summary", "description", new Hashtable<String, Object>());
String filename = (String) call("ticket.putAttachment", id, "attach.txt", "description", "data".getBytes(), true);
@@ -412,8 +412,8 @@ public class TracXmlRpcTest extends TestCase {
}
public void testDuplicateAttachment() throws XmlRpcException, IOException {
- int id1 = createTicket("summary", "description", new Hashtable());
- int id2 = createTicket("summary", "description", new Hashtable());
+ int id1 = createTicket("summary", "description", new Hashtable<String, Object>());
+ int id2 = createTicket("summary", "description", new Hashtable<String, Object>());
String filename1 = (String) call("ticket.putAttachment", id1, "attach.txt", "description", "data".getBytes(), true);
String filename2 = (String) call("ticket.putAttachment", id2, "attach.txt", "description", "data2".getBytes(), true);
@@ -435,9 +435,9 @@ public class TracXmlRpcTest extends TestCase {
call("ticket.delete", (Integer) id);
}
- int id1 = createTicket("foobarsum1", "description", new Hashtable());
- int id2 = createTicket("foobaz sum2", "description", new Hashtable());
- int id3 = createTicket("foobarbaz3", "foobarbaz description3", new Hashtable());
+ int id1 = createTicket("foobarsum1", "description", new Hashtable<String, Object>());
+ int id2 = createTicket("foobaz sum2", "description", new Hashtable<String, Object>());
+ int id3 = createTicket("foobarbaz3", "foobarbaz description3", new Hashtable<String, Object>());
ret = (Object[]) call("ticket.query", "summary=foobarsum1|foobaz sum2");
assertEquals(2, ret.length);
@@ -458,7 +458,7 @@ public class TracXmlRpcTest extends TestCase {
}
public void testQueryAll() throws XmlRpcException, IOException {
- int id = createTicket("foo", "description", new Hashtable());
+ int id = createTicket("foo", "description", new Hashtable<String, Object>());
Object[] ret = (Object[]) call("ticket.query", "order=id");
assertTrue(ret.length > 0);
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java
index 4e8a4f6cc..7a324be61 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java
@@ -88,6 +88,7 @@ public class XmlRpcServer {
return create(params);
}
+ @SuppressWarnings("unchecked")
public Object[] get() throws Exception {
Hashtable values = (Hashtable) call(module + ".get", id);
Object[] result = new Object[values.size()];
@@ -157,7 +158,7 @@ public class XmlRpcServer {
}
public Ticket create(String summary, String description) throws Exception {
- this.id = (Integer) call("ticket.create", summary, description, new Hashtable());
+ this.id = (Integer) call("ticket.create", summary, description, new Hashtable<String, Object>());
if (id == null) {
throw new RuntimeException("Could not create ticket: " + summary);
}
@@ -181,7 +182,7 @@ public class XmlRpcServer {
return getValues().get(key);
}
- public Map getValues() throws Exception {
+ public Map<?, ?> getValues() throws Exception {
return (Map) ((Object[]) call("ticket.get", id))[3];
}

Back to the top