diff options
author | Marc Khouzam | 2015-04-15 18:05:52 +0000 |
---|---|---|
committer | Marc Khouzam | 2015-04-15 19:39:36 +0000 |
commit | 3f8305fc0fb9e54dca63f4d8d35521789ccc1d68 (patch) | |
tree | d5ce945cf03bc5158a6c00f6c052afa376f46e94 /dsf/org.eclipse.cdt.tests.dsf/src | |
parent | 30b6492de18921452e4807e5b6cf7091b071c491 (diff) | |
download | org.eclipse.cdt-3f8305fc0fb9e54dca63f4d8d35521789ccc1d68.tar.gz org.eclipse.cdt-3f8305fc0fb9e54dca63f4d8d35521789ccc1d68.tar.xz org.eclipse.cdt-3f8305fc0fb9e54dca63f4d8d35521789ccc1d68.zip |
Move to new getAdapter() signature using generics
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Diffstat (limited to 'dsf/org.eclipse.cdt.tests.dsf/src')
-rw-r--r-- | dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModel.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModel.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModel.java index 9d5dac702db..a28d96a57b3 100644 --- a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModel.java +++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/vm/TestModel.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 Wind River Systems and others. + * Copyright (c) 2009, 2015 Wind River Systems 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 @@ -31,7 +31,9 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer; import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta; import org.eclipse.jface.viewers.TreePath; + import static org.junit.Assert.*; + import org.osgi.framework.BundleContext; /** @@ -93,11 +95,11 @@ public class TestModel extends AbstractDsfService implements IFormattedValues { return fModel; } - @SuppressWarnings("rawtypes") - @Override - public Object getAdapter(Class adapter) { + @SuppressWarnings("unchecked") + @Override + public <T> T getAdapter(Class<T> adapter) { if (adapter.isInstance(fModel)) { - return fModel; + return (T)fModel; } return null; } |