diff options
Diffstat (limited to 'sca-cpp/trunk/modules/java')
4 files changed, 20 insertions, 22 deletions
diff --git a/sca-cpp/trunk/modules/java/eval.hpp b/sca-cpp/trunk/modules/java/eval.hpp index 58a1ab5ff9..741dda52ca 100644 --- a/sca-cpp/trunk/modules/java/eval.hpp +++ b/sca-cpp/trunk/modules/java/eval.hpp @@ -501,7 +501,7 @@ const failable<value> evalClass(const JavaRuntime& jr, const value& expr, const // The start, stop, and restart functions are optional const value fn = car<value>(expr); - if (fn == "start" || fn == "restart" || "stop") + if (fn == "start" || fn == "stop") return value(lambda<value(const list<value>&)>()); return mkfailure<value>(string("Couldn't find function: ") + car<value>(expr) + " : " + lastException(jr)); diff --git a/sca-cpp/trunk/modules/java/org/apache/tuscany/ClassLoader.java b/sca-cpp/trunk/modules/java/org/apache/tuscany/ClassLoader.java index 78b9ec7d90..7fb6519472 100644 --- a/sca-cpp/trunk/modules/java/org/apache/tuscany/ClassLoader.java +++ b/sca-cpp/trunk/modules/java/org/apache/tuscany/ClassLoader.java @@ -19,8 +19,6 @@ package org.apache.tuscany; -import static org.apache.tuscany.ClassLoader.Test.*; - import java.io.File; import java.net.MalformedURLException; import java.net.URL; @@ -36,7 +34,7 @@ class ClassLoader extends URLClassLoader { } /** - * Create a class loader for an SCA contribution path. + * Create a class loader for an SCA contribution path. */ static java.lang.ClassLoader valueOf(final String path) throws MalformedURLException { return new ClassLoader(new File(path).toURI().toURL()); diff --git a/sca-cpp/trunk/modules/java/org/apache/tuscany/IterableUtil.java b/sca-cpp/trunk/modules/java/org/apache/tuscany/IterableUtil.java index ef18b856db..85872cba72 100644 --- a/sca-cpp/trunk/modules/java/org/apache/tuscany/IterableUtil.java +++ b/sca-cpp/trunk/modules/java/org/apache/tuscany/IterableUtil.java @@ -20,7 +20,6 @@ package org.apache.tuscany; import static java.util.Arrays.*; -import static org.apache.tuscany.IterableUtil.Test.*; import java.util.AbstractList; import java.util.ArrayList; @@ -369,10 +368,10 @@ public class IterableUtil { public static void main(final String[] args) { System.out.println("Testing..."); - + Test.class.getClassLoader().setDefaultAssertionStatus(true); new Test().testList(); - + System.out.println("OK"); } 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; } - + } |