diff options
Diffstat (limited to 'sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany')
2 files changed, 2 insertions, 10 deletions
diff --git a/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java b/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java index 8de2a3a3f9..b82b27d02d 100644 --- a/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java +++ b/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java @@ -44,16 +44,12 @@ public class NodeImplementationDaemonBootstrap { public void start() { threadContextClassLoader = Thread.currentThread().getContextClassLoader(); - boolean started = false; try { Thread.currentThread().setContextClassLoader(runtimeClassLoader); SCANodeFactory factory = SCANodeFactory.newInstance(); daemon = factory.createSCANodeFromClassLoader("NodeDaemon.composite", threadContextClassLoader); - started = true; } finally { - if (!started) { - Thread.currentThread().setContextClassLoader(threadContextClassLoader); - } + Thread.currentThread().setContextClassLoader(threadContextClassLoader); } } diff --git a/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java b/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java index 0264574fb9..f92e1a7406 100644 --- a/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java +++ b/sca-java-1.x/trunk/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java @@ -50,15 +50,11 @@ public class NodeImplementationLauncherBootstrap { public void start() { threadContextClassLoader = Thread.currentThread().getContextClassLoader(); - boolean started = false; try { Thread.currentThread().setContextClassLoader(runtimeClassLoader); delegate.start(); - started = true; } finally { - if (!started) { - Thread.currentThread().setContextClassLoader(threadContextClassLoader); - } + Thread.currentThread().setContextClassLoader(threadContextClassLoader); } } |