You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by cs...@apache.org on 2016/06/24 12:39:36 UTC

[2/2] aries-rsa git commit: [ARIES-1582] Fixes on fastbin tests

[ARIES-1582] Fixes on fastbin tests


Project: http://git-wip-us.apache.org/repos/asf/aries-rsa/repo
Commit: http://git-wip-us.apache.org/repos/asf/aries-rsa/commit/99f1571e
Tree: http://git-wip-us.apache.org/repos/asf/aries-rsa/tree/99f1571e
Diff: http://git-wip-us.apache.org/repos/asf/aries-rsa/diff/99f1571e

Branch: refs/heads/master
Commit: 99f1571efaf481cf30d797ab582500c65135bf46
Parents: 3d33d29
Author: Christian Schneider <ch...@die-schneider.net>
Authored: Fri Jun 24 14:39:27 2016 +0200
Committer: Christian Schneider <ch...@die-schneider.net>
Committed: Fri Jun 24 14:39:27 2016 +0200

----------------------------------------------------------------------
 .../aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java     | 7 +++++--
 .../org/apache/aries/rsa/provider/fastbin/InvocationTest.java | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/99f1571e/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java
----------------------------------------------------------------------
diff --git a/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java b/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java
index a0b0f2c..877b297 100644
--- a/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java
+++ b/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java
@@ -24,6 +24,7 @@ import java.lang.reflect.Method;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.WeakHashMap;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -42,6 +43,7 @@ import org.fusesource.hawtbuf.DataByteArrayInputStream;
 import org.fusesource.hawtbuf.DataByteArrayOutputStream;
 import org.fusesource.hawtbuf.UTF8Buffer;
 import org.fusesource.hawtdispatch.DispatchQueue;
+import org.osgi.framework.ServiceException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -51,7 +53,8 @@ public class ClientInvokerImpl implements ClientInvoker, Dispatched {
 
     protected static final Logger LOGGER = LoggerFactory.getLogger(ClientInvokerImpl.class);
 
-    private final static HashMap<Class,String> CLASS_TO_PRIMITIVE = new HashMap<Class, String>(8, 1.0F);
+    @SuppressWarnings("rawtypes")
+    private final static Map<Class,String> CLASS_TO_PRIMITIVE = new HashMap<Class, String>(8, 1.0F);
 
     static {
         CLASS_TO_PRIMITIVE.put(boolean.class,"Z");
@@ -134,7 +137,7 @@ public class ClientInvokerImpl implements ClientInvoker, Dispatched {
     protected void onCommand(TransportPool pool, Object data) {
         try {
             DataByteArrayInputStream bais = new DataByteArrayInputStream( (Buffer) data);
-            int size = bais.readInt();
+            bais.readInt();
             long correlation = bais.readVarLong();
             pool.onDone(correlation);
             ResponseFuture response = requests.remove(correlation);

http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/99f1571e/provider/fastbin/src/test/java/org/apache/aries/rsa/provider/fastbin/InvocationTest.java
----------------------------------------------------------------------
diff --git a/provider/fastbin/src/test/java/org/apache/aries/rsa/provider/fastbin/InvocationTest.java b/provider/fastbin/src/test/java/org/apache/aries/rsa/provider/fastbin/InvocationTest.java
index 1cde9b2..7725375 100644
--- a/provider/fastbin/src/test/java/org/apache/aries/rsa/provider/fastbin/InvocationTest.java
+++ b/provider/fastbin/src/test/java/org/apache/aries/rsa/provider/fastbin/InvocationTest.java
@@ -132,7 +132,7 @@ public class InvocationTest {
                 }
             }, HelloImpl.class.getClassLoader());
 
-            InvocationHandler handler = client.getProxy(server.getConnectAddress(), "service-id", HelloImpl.class.getClassLoader(),FastBinProvider.PROTOCOL_VERSION);
+            InvocationHandler handler = client.getProxy(server.getConnectAddress(), "service-id", HelloImpl.class.getClassLoader());
             Hello hello  = (Hello) Proxy.newProxyInstance(HelloImpl.class.getClassLoader(), new Class[] { Hello.class }, handler);
             assertNotEquals("Hashcode should be handled by the proxy and not be a remote call",-7, hello.hashCode());
             assertFalse("equals should be handled by the proxy and not be a remote call",hello.equals(serviceImpl));