diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-22 06:08:34 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-22 06:08:34 +0000 |
commit | 8c771c8ecd9bdc6b3ef0d5417db9bb9917b65fa9 (patch) | |
tree | a3671bc719d351a822b3728323e6456f163af2c3 /sca-cpp/trunk/modules/java/test | |
parent | d11cbfda813c7c6b32c06ddb33242fe3c82514eb (diff) |
Moved component start calls from HTTPD postConfig to childInit, to give components an opportunity to start and setup connections and resources in each HTTPD child process. Adjusted utility components and test cases to this change. Minor code cleanup of Java components and integration tests.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@912491 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/java/test')
-rw-r--r-- | sca-cpp/trunk/modules/java/test/CalcImpl.java | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/sca-cpp/trunk/modules/java/test/CalcImpl.java b/sca-cpp/trunk/modules/java/test/CalcImpl.java index 5337afe460..5bea01a43f 100644 --- a/sca-cpp/trunk/modules/java/test/CalcImpl.java +++ b/sca-cpp/trunk/modules/java/test/CalcImpl.java @@ -19,33 +19,34 @@ package test; -import java.util.List; import java.util.ArrayList; +import java.util.List; + import org.apache.tuscany.Service; public class CalcImpl { - - public Double add(Double x, Double y, Adder adder) { + + public Double add(final Double x, final Double y, final Adder adder) { return adder.add(x, y); } - - public Double addEval(Double x, Double y, Service adder) { + + public Double addEval(final Double x, final Double y, final Service adder) { return adder.eval("add", x, y); } - - public Double mult(Double x, Double y) { + + public Double mult(final Double x, final Double y) { return x * y; } - - public Boolean even(Double x) { - return (double)(((int)(double)x / 2) * 2) == (double)x; + + public Boolean even(final Double x) { + return (double)((int)(double)x / 2 * 2) == (double)x; } - - public Iterable<Double> square(Iterable<Double> l) { - List r = new ArrayList(); - for (Double x: l) + + public Iterable<Double> square(final Iterable<Double> l) { + final List<Double> r = new ArrayList<Double>(); + for(final Double x : l) r.add(x * x); return r; } - + } |