Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/mocks/MockBundleContext.java42
-rw-r--r--plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/OperationApplication.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java2
3 files changed, 32 insertions, 15 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/mocks/MockBundleContext.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/mocks/MockBundleContext.java
index 9f1a169a36..0b46616918 100644
--- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/mocks/MockBundleContext.java
+++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/mocks/MockBundleContext.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.core.test.mocks;
import java.io.File;
import java.io.InputStream;
+import java.util.Collection;
import java.util.Dictionary;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -97,53 +98,68 @@ public class MockBundleContext implements BundleContext {
//
}
- @SuppressWarnings("rawtypes")
@Override
- public ServiceRegistration registerService(String[] clazzes, Object service, Dictionary properties) {
+ public ServiceRegistration<?> registerService(String[] clazzes, Object service, Dictionary<String, ?> properties) {
return null;
}
- @SuppressWarnings("rawtypes")
@Override
- public ServiceRegistration registerService(String clazz, Object service, Dictionary properties) {
+ public ServiceRegistration<?> registerService(String clazz, Object service, Dictionary<String, ?> properties) {
return null;
}
- @SuppressWarnings("unused")
@Override
- public ServiceReference[] getServiceReferences(String clazz, String filter) throws InvalidSyntaxException {
+ public <S> ServiceRegistration<S> registerService(Class<S> clazz, S service, Dictionary<String, ?> properties) {
return null;
}
- @SuppressWarnings("unused")
@Override
- public ServiceReference[] getAllServiceReferences(String clazz, String filter) throws InvalidSyntaxException {
+ public <S> ServiceReference<S> getServiceReference(Class<S> clazz) {
return null;
}
@Override
- public ServiceReference getServiceReference(String clazz) {
+ public <S> Collection<ServiceReference<S>> getServiceReferences(Class<S> clazz, String filter) {
return null;
}
@Override
- public Object getService(ServiceReference reference) {
+ public <S> S getService(ServiceReference<S> reference) {
return null;
}
@Override
- public boolean ungetService(ServiceReference reference) {
+ public boolean ungetService(ServiceReference<?> reference) {
return false;
}
@Override
+ public Bundle getBundle(String location) {
+ return null;
+ }
+
+ @Override
+ public ServiceReference<?>[] getServiceReferences(String clazz, String filter) {
+ return null;
+ }
+
+ @Override
+ public ServiceReference<?>[] getAllServiceReferences(String clazz, String filter) {
+ return null;
+ }
+
+ @Override
+ public ServiceReference<?> getServiceReference(String clazz) {
+ return null;
+ }
+
+ @Override
public File getDataFile(String filename) {
return null;
}
- @SuppressWarnings("unused")
@Override
- public Filter createFilter(String filter) throws InvalidSyntaxException {
+ public Filter createFilter(String filter) {
return null;
}
diff --git a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/OperationApplication.java b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/OperationApplication.java
index 9da598ce4b..c4d526e391 100644
--- a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/OperationApplication.java
+++ b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/OperationApplication.java
@@ -37,13 +37,14 @@ public class OperationApplication implements IApplication {
return IApplication.EXIT_OK;
}
+ @SuppressWarnings("unchecked")
private IOperation loadOperation(String bundleName, String className) throws OseeCoreException, IllegalAccessException, ClassNotFoundException {
try {
Bundle bundle = Platform.getBundle(bundleName);
if (bundle == null) {
throw new OseeArgumentException("Platform.getBundle found not find [%s]", bundleName);
}
- Class<IOperation> clazz = bundle.loadClass(className);
+ Class<IOperation> clazz = (Class<IOperation>) bundle.loadClass(className);
return clazz.newInstance();
} catch (InstantiationException ex) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java
index f8e03e5244..fe75324821 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java
@@ -98,7 +98,7 @@ public class AttributeExtensionManager {
Class<T> toReturn = null;
try {
Bundle bundle = Platform.getBundle(bundleName);
- toReturn = bundle.loadClass(className);
+ toReturn = (Class<T>) bundle.loadClass(className);
} catch (ClassNotFoundException ex) {
OseeExceptions.wrapAndThrow(ex);
}

Back to the top