diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-06 15:52:15 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-06 15:52:15 +0000 |
commit | 0fde21b30b8dc03943485894515a7ba348079548 (patch) | |
tree | 8d2a3fe79875e8eb531cd950c22e23bc7547b68a | |
parent | 53a5528c7a8b30ce476a090cdb27b567a8dc3af7 (diff) |
Minor code simplification.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@692671 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/sca/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/TestEquinoxHost.java | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/java/sca/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/TestEquinoxHost.java b/java/sca/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/TestEquinoxHost.java index 41202d3d1b..e000faa447 100644 --- a/java/sca/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/TestEquinoxHost.java +++ b/java/sca/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/TestEquinoxHost.java @@ -76,7 +76,14 @@ public class TestEquinoxHost { public BundleContext start() { try { - return startup(); + Map<Object, Object> props = new HashMap<Object, Object>(); + props.put("org.osgi.framework.system.packages", systemPackages); + props.put(EclipseStarter.PROP_CLEAN, "true"); + props.put(LocationManager.PROP_INSTANCE_AREA, new File("target/workspace").toURI().toString()); + props.put(LocationManager.PROP_INSTALL_AREA, new File("target/eclipse").toURI().toString()); + EclipseStarter.setInitialProperties(props); + BundleContext context = EclipseStarter.startup(new String[]{}, null); + return context; } catch (Exception e) { throw new IllegalStateException(e); } @@ -84,26 +91,10 @@ public class TestEquinoxHost { public void stop() { try { - shutdown(); + EclipseStarter.shutdown(); } catch (Exception e) { throw new IllegalStateException(e); } } - private BundleContext startup() throws Exception { - String args[] = {}; - Map<Object, Object> props = new HashMap<Object, Object>(); - props.put("org.osgi.framework.system.packages", systemPackages); - props.put(EclipseStarter.PROP_CLEAN, "true"); - props.put(LocationManager.PROP_INSTANCE_AREA, new File("target/workspace").toURI().toString()); - props.put(LocationManager.PROP_INSTALL_AREA, new File("target/eclipse").toURI().toString()); - EclipseStarter.setInitialProperties(props); - BundleContext context = EclipseStarter.startup(args, null); - return context; - } - - private void shutdown() throws Exception { - EclipseStarter.shutdown(); - } - } |