diff options
Diffstat (limited to 'sca-cpp/trunk/modules/java/org/apache/tuscany')
3 files changed, 6 insertions, 17 deletions
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 7fb6519472..ef7b2316fb 100644 --- a/sca-cpp/trunk/modules/java/org/apache/tuscany/ClassLoader.java +++ b/sca-cpp/trunk/modules/java/org/apache/tuscany/ClassLoader.java @@ -14,7 +14,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ package org.apache.tuscany; diff --git a/sca-cpp/trunk/modules/java/org/apache/tuscany/InvocationHandler.java b/sca-cpp/trunk/modules/java/org/apache/tuscany/InvocationHandler.java index c5ec6005a1..06466fe9fc 100644 --- a/sca-cpp/trunk/modules/java/org/apache/tuscany/InvocationHandler.java +++ b/sca-cpp/trunk/modules/java/org/apache/tuscany/InvocationHandler.java @@ -14,7 +14,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ package org.apache.tuscany; @@ -25,7 +25,7 @@ import java.lang.reflect.Method; import java.lang.reflect.Proxy; /** - * Proxy Invocation handler used to represent SCA component references. + * Proxy Invocation handler used to represent SCA component references. */ class InvocationHandler implements java.lang.reflect.InvocationHandler { final long lambda; @@ -33,7 +33,7 @@ class InvocationHandler implements java.lang.reflect.InvocationHandler { InvocationHandler(final long lambda) { this.lambda = lambda; } - + /** * Create a proxy for an interface and the lambda function representing * an SCA component reference. @@ -45,7 +45,6 @@ class InvocationHandler implements java.lang.reflect.InvocationHandler { /** * Proxy invocation of a C++ function. */ - @Override public native Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable; /** 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 85872cba72..6d559f370a 100644 --- a/sca-cpp/trunk/modules/java/org/apache/tuscany/IterableUtil.java +++ b/sca-cpp/trunk/modules/java/org/apache/tuscany/IterableUtil.java @@ -14,7 +14,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ package org.apache.tuscany; @@ -93,7 +93,6 @@ public class IterableUtil { if(l instanceof Collection<?>) return new ArrayIterable<T>(((Collection<?>)l).toArray(), 1); return new Iterable<T>() { - @Override public Iterator<T> iterator() { final Iterator<T> i = ((Iterable<T>)l).iterator(); i.next(); @@ -148,7 +147,7 @@ public class IterableUtil { @Override public int size() { - throw new UnsupportedOperationException(); + return this.isNil()? 0 : 1 + ((List<T>)this.cdr()).size(); } @Override @@ -190,18 +189,15 @@ public class IterableUtil { return new Iterator<T>() { int i = ArrayIterable.this.start; - @Override public boolean hasNext() { return this.i < ArrayIterable.this.a.length; } @SuppressWarnings("unchecked") - @Override public T next() { return (T)ArrayIterable.this.a[this.i++]; } - @Override public void remove() { throw new UnsupportedOperationException(); } @@ -242,18 +238,15 @@ public class IterableUtil { return new Iterator<T>() { int i = ListIterable.this.start; - @Override public boolean hasNext() { return this.i < ListIterable.this.l.size(); } @SuppressWarnings("unchecked") - @Override public T next() { return (T)ListIterable.this.l.get(this.i++); } - @Override public void remove() { throw new UnsupportedOperationException(); } @@ -296,7 +289,6 @@ public class IterableUtil { boolean carIterator = true; Iterator<?> cdrIterator = PairIterable.this.cdr.iterator(); - @Override public boolean hasNext() { if(this.carIterator) return true; @@ -304,7 +296,6 @@ public class IterableUtil { } @SuppressWarnings("unchecked") - @Override public T next() { if(this.carIterator) { this.carIterator = false; @@ -313,7 +304,6 @@ public class IterableUtil { return (T)this.cdrIterator.next(); } - @Override public void remove() { throw new UnsupportedOperationException(); } |