diff --git a/redisson/src/main/java/org/redisson/RedissonExecutorService.java b/redisson/src/main/java/org/redisson/RedissonExecutorService.java index 42f064a4b..9b3091763 100644 --- a/redisson/src/main/java/org/redisson/RedissonExecutorService.java +++ b/redisson/src/main/java/org/redisson/RedissonExecutorService.java @@ -15,15 +15,10 @@ */ package org.redisson; -import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; -import java.io.ObjectOutput; -import java.io.ObjectOutputStream; -import java.lang.invoke.SerializedLambda; import java.lang.ref.ReferenceQueue; -import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Arrays; @@ -415,29 +410,6 @@ public class RedissonExecutorService implements RScheduledExecutorService { InputStream classStream = c.getClassLoader().getResourceAsStream(classAsPath); byte[] lambdaBody = null; - if (classStream == null) { - ByteArrayOutputStream os = new ByteArrayOutputStream(); - try { - ObjectOutput oo = new ObjectOutputStream(os); - oo.writeObject(task); - } catch (Exception e) { - throw new IllegalArgumentException("Unable to serialize lambda", e); - } - lambdaBody = os.toByteArray(); - - SerializedLambda lambda; - try { - Method writeReplace = task.getClass().getDeclaredMethod("writeReplace"); - writeReplace.setAccessible(true); - lambda = (SerializedLambda) writeReplace.invoke(task); - } catch (Exception ex) { - throw new IllegalArgumentException("Lambda should implement java.io.Serializable interface", ex); - } - - className = lambda.getCapturingClass().replace('/', '.'); - classStream = task.getClass().getClassLoader().getResourceAsStream(lambda.getCapturingClass() + ".class"); - } - byte[] classBody; try { DataInputStream s = new DataInputStream(classStream); diff --git a/redisson/src/main/java/org/redisson/connection/RedisClientEntry.java b/redisson/src/main/java/org/redisson/connection/RedisClientEntry.java index a01ec719b..b61359609 100644 --- a/redisson/src/main/java/org/redisson/connection/RedisClientEntry.java +++ b/redisson/src/main/java/org/redisson/connection/RedisClientEntry.java @@ -66,7 +66,7 @@ public class RedisClientEntry implements ClusterNode { } public RFuture pingAsync() { - RPromise result = new RedissonPromise(); + final RPromise result = new RedissonPromise(); RFuture f = commandExecutor.readAsync(client, null, RedisCommands.PING_BOOL); f.addListener(new FutureListener() { @Override diff --git a/redisson/src/test/java/org/redisson/RedissonTest.java b/redisson/src/test/java/org/redisson/RedissonTest.java index a5a31a825..3786d7f33 100644 --- a/redisson/src/test/java/org/redisson/RedissonTest.java +++ b/redisson/src/test/java/org/redisson/RedissonTest.java @@ -817,20 +817,6 @@ public class RedissonTest { assertThat(c.toYAML()).isEqualTo(t); } -// @Test - public void testCluster() { - NodesGroup nodes = redisson.getClusterNodesGroup(); - Assert.assertEquals(2, nodes.getNodes().size()); - - nodes.getNodes().stream().forEach((node) -> { - Map params = node.info(); - Assert.assertNotNull(params); - Assert.assertTrue(node.ping()); - }); - - Assert.assertTrue(nodes.pingAll()); - } - @Test public void testNodesInCluster() throws Exception { RedisRunner master1 = new RedisRunner().randomPort().randomDir().nosave();