Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2019-03-17 04:15:34 -0400
committerMichael Keppler2019-03-17 10:49:28 -0400
commitc525a0bf4583713b07741c2b44c5f0a7691c3aa4 (patch)
tree141c203d978d616cad5b3e8c2280aaca6ec2e44c /org.eclipse.egit.core.test/src
parentc3a285e7f553fa6dea72ce1882e0c0e652ed3f7e (diff)
downloadegit-c525a0bf4583713b07741c2b44c5f0a7691c3aa4.tar.gz
egit-c525a0bf4583713b07741c2b44c5f0a7691c3aa4.tar.xz
egit-c525a0bf4583713b07741c2b44c5f0a7691c3aa4.zip
Fix type-safe warnings
After the generifying of the adapter methods by Thomas, these were all remaining type-safe warnings. Change-Id: I7c5f485f80ebe6cfd185c0a026e00e27a4f46fbb Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Diffstat (limited to 'org.eclipse.egit.core.test/src')
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/models/SampleModelAdapterFactory.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/models/SampleModelAdapterFactory.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/models/SampleModelAdapterFactory.java
index 784171597..08ebfc3d7 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/models/SampleModelAdapterFactory.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/models/SampleModelAdapterFactory.java
@@ -16,17 +16,17 @@ import org.eclipse.team.core.mapping.IResourceMappingMerger;
public class SampleModelAdapterFactory implements IAdapterFactory {
@Override
- public Object getAdapter(Object adaptableObject, Class adapterType) {
+ public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
if (adaptableObject instanceof SampleModelProvider
&& IResourceMappingMerger.class.isAssignableFrom(adapterType)) {
- return new SampleResourceMappingMerger(
- (ModelProvider) adaptableObject);
+ return adapterType.cast(new SampleResourceMappingMerger(
+ (ModelProvider) adaptableObject));
}
return null;
}
@Override
- public Class[] getAdapterList() {
+ public Class<?>[] getAdapterList() {
return new Class[] { IResourceMappingMerger.class, };
}
}

Back to the top