Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2015-03-26 09:47:41 +0000
committerAlexander Kurtakov2015-03-26 12:10:18 +0000
commit0c62e8ab9d030fa87c29f6a3ca8d38eb01aada1e (patch)
tree5c3b5f24eb0c6712a4887098fb5c3e6343df6c5c
parent55c54bce79cc1f9b30d4e2ef594c08f03a1c7f9f (diff)
downloadorg.eclipse.linuxtools-0c62e8ab9d030fa87c29f6a3ca8d38eb01aada1e.tar.gz
org.eclipse.linuxtools-0c62e8ab9d030fa87c29f6a3ca8d38eb01aada1e.tar.xz
org.eclipse.linuxtools-0c62e8ab9d030fa87c29f6a3ca8d38eb01aada1e.zip
Generify getAdapter methods.
Change-Id: I94def0bb6849cdc4d2866e32d50588b41636abbd Signed-off-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-on: https://git.eclipse.org/r/44661 Tested-by: Hudson CI
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PatchFile.java9
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/StorageEditorInput.java6
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/fixtures/CStringStorage.java4
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/fixtures/CStringStorageInput.java4
-rw-r--r--profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditorInput.java3
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/RpmConsolePageParticipant.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/views/GraphSelectorEditorInput.java4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScriptConsolePageParticipant.java3
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/charting/ChartEditorInput.java5
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubProcess.java3
10 files changed, 15 insertions, 29 deletions
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PatchFile.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PatchFile.java
index eb6cb83514..2effccb1cd 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PatchFile.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PatchFile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 Red Hat Inc. and others.
+ * Copyright (c) 2006, 2015 Red Hat Inc. 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,11 +20,6 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.IPath;
-/**
- *
- * @author klee
- *
- */
public class PatchFile {
private static class EmptyStorage implements IStorage {
@@ -43,7 +38,7 @@ public class PatchFile {
}
@Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/StorageEditorInput.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/StorageEditorInput.java
index aa33eb4547..93efcfd01e 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/StorageEditorInput.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/StorageEditorInput.java
@@ -98,12 +98,8 @@ public abstract class StorageEditorInput implements IStorageEditorInput {
return getStorage().hashCode();
}
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
@Override
- @SuppressWarnings({ "rawtypes" })
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
diff --git a/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/fixtures/CStringStorage.java b/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/fixtures/CStringStorage.java
index 9f16aace40..47e44d9a2b 100644
--- a/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/fixtures/CStringStorage.java
+++ b/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/fixtures/CStringStorage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc. and others.
+ * Copyright (c) 2010, 2015 Red Hat Inc. 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
@@ -35,7 +35,7 @@ public class CStringStorage implements IStorage {
}
@Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
diff --git a/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/fixtures/CStringStorageInput.java b/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/fixtures/CStringStorageInput.java
index 9f3e638d5e..bd3ce0ea7c 100644
--- a/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/fixtures/CStringStorageInput.java
+++ b/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/fixtures/CStringStorageInput.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc. and others.
+ * Copyright (c) 2010, 2015 Red Hat Inc. 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
@@ -55,7 +55,7 @@ public class CStringStorageInput implements IStorageEditorInput {
}
@Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
diff --git a/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditorInput.java b/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditorInput.java
index 15a6fd2332..8d58c73e88 100644
--- a/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditorInput.java
+++ b/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditorInput.java
@@ -66,8 +66,7 @@ public class STCSourceNotFoundEditorInput implements IEditorInput {
}
@Override
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/RpmConsolePageParticipant.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/RpmConsolePageParticipant.java
index 9bbe7c936b..45e51613d9 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/RpmConsolePageParticipant.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/RpmConsolePageParticipant.java
@@ -22,8 +22,7 @@ import org.eclipse.ui.part.IPageBookViewPage;
public class RpmConsolePageParticipant implements IConsolePageParticipant {
@Override
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/views/GraphSelectorEditorInput.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/views/GraphSelectorEditorInput.java
index a0c4491f77..59e97aaaf0 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/views/GraphSelectorEditorInput.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/views/GraphSelectorEditorInput.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012-2013 Red Hat, Inc.
+ * Copyright (c) 2012, 2015 Red Hat, Inc.
* 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
@@ -37,7 +37,7 @@ public class GraphSelectorEditorInput implements IEditorInput {
}
@Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScriptConsolePageParticipant.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScriptConsolePageParticipant.java
index 2e29f88fc0..c16bd20e0a 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScriptConsolePageParticipant.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScriptConsolePageParticipant.java
@@ -36,8 +36,7 @@ public class ScriptConsolePageParticipant implements IConsolePageParticipant, ID
private ScriptConsole fConsole;
@Override
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/charting/ChartEditorInput.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/charting/ChartEditorInput.java
index bcedbaa9c9..20cecc3258 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/charting/ChartEditorInput.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/charting/ChartEditorInput.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
+ * Copyright (c) 2008, 2015 Red Hat, Inc.
* 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
@@ -62,8 +62,7 @@ public class ChartEditorInput implements IEditorInput {
}
@Override
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubProcess.java b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubProcess.java
index f01312dffa..930ef0a1b6 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubProcess.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/tests/ValgrindStubProcess.java
@@ -63,8 +63,7 @@ public class ValgrindStubProcess implements IProcess {
}
@Override
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}

Back to the top