From 329f16d7c31de8817bda9cdab90f0c08425cd2b1 Mon Sep 17 00:00:00 2001 From: lresende Date: Fri, 12 Jun 2009 07:50:47 +0000 Subject: Minor cosmetic/formatting changes git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@784017 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/node/NodeFactory.java | 29 ++++++++++------------ 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'java/sca/modules/node-api/src/main') diff --git a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java index 23efdf729a..94df876a31 100644 --- a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java +++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java @@ -90,9 +90,7 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { public B getService(Class businessInterface, String serviceName) { try { - return (B)node.getClass().getMethod("getService", Class.class, String.class).invoke(node, - businessInterface, - serviceName); + return (B)node.getClass().getMethod("getService", Class.class, String.class).invoke(node, businessInterface, serviceName); } catch (Throwable e) { handleException(e); return null; @@ -101,8 +99,7 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { public ServiceReference getServiceReference(Class businessInterface, String serviceName) { try { - return (ServiceReference)node.getClass().getMethod("getServiceReference", Class.class, String.class) - .invoke(node, businessInterface, serviceName); + return (ServiceReference)node.getClass().getMethod("getServiceReference", Class.class, String.class).invoke(node, businessInterface, serviceName); } catch (Throwable e) { handleException(e); return null; @@ -354,17 +351,6 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { return createNode(configuration); } - private NodeConfiguration createConfiguration(Contribution... contributions) { - NodeConfigurationFactory factory = this; - NodeConfiguration configuration = factory.createNodeConfiguration(); - if (contributions != null) { - for (Contribution c : contributions) { - configuration.addContribution(c.getURI(), c.getLocation()); - } - } - return configuration; - } - /** * Creates a new SCA node using defaults for the contribution location and deployable composites. * By default, it uses the Thread context classloader to find META-INF/sca-contribution.xml or @@ -383,6 +369,17 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { Contribution[] contributions = getContributions(locations); return createNode(contributions); } + + private NodeConfiguration createConfiguration(Contribution... contributions) { + NodeConfigurationFactory factory = this; + NodeConfiguration configuration = factory.createNodeConfiguration(); + if (contributions != null) { + for (Contribution c : contributions) { + configuration.addContribution(c.getURI(), c.getLocation()); + } + } + return configuration; + } private Contribution[] getContributions(List locations) { Contribution[] contributions = new Contribution[locations.size()]; -- cgit v1.2.3