From a14978925a6ca3fac137d350edc924ac5ce763ad Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:02:17 +0600 Subject: [PATCH] Resolve compile warnings with message `... non-varargs call of varargs method with inexact argument type for last parameter; ...` --- .../clients/jedis/UnifiedJedisCustomCommandsTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/redis/clients/jedis/UnifiedJedisCustomCommandsTest.java b/src/test/java/redis/clients/jedis/UnifiedJedisCustomCommandsTest.java index bb125cc28d..4ffc54cc54 100644 --- a/src/test/java/redis/clients/jedis/UnifiedJedisCustomCommandsTest.java +++ b/src/test/java/redis/clients/jedis/UnifiedJedisCustomCommandsTest.java @@ -46,7 +46,7 @@ public void testSendCommandWithProtocolCommandAndByteArrayArgs() { byte[][] args = { "arg1".getBytes(), "arg2".getBytes() }; CommandArguments commandArguments = mock(CommandArguments.class); CommandArguments commandArgumentsWithArgs = mock(CommandArguments.class); - when(commandArguments.addObjects(args)).thenReturn(commandArgumentsWithArgs); + when(commandArguments.addObjects((Object[]) args)).thenReturn(commandArgumentsWithArgs); when(commandObjects.commandArguments(cmd)).thenReturn(commandArguments); when(commandExecutor.executeCommand(any())).thenReturn("OK"); @@ -74,7 +74,7 @@ public void testSendBlockingCommandWithProtocolCommandAndByteArrayArgs() { CommandArguments commandArgumentsWithArgs = mock(CommandArguments.class); when(commandArgumentsWithArgs.blocking()).thenReturn(commandArgumentsBlocking); - when(commandArguments.addObjects(args)).thenReturn(commandArgumentsWithArgs); + when(commandArguments.addObjects((Object[]) args)).thenReturn(commandArgumentsWithArgs); when(commandObjects.commandArguments(cmd)).thenReturn(commandArguments); when(commandExecutor.executeCommand(any())).thenReturn("OK"); @@ -98,7 +98,7 @@ public void testSendCommandWithProtocolCommandAndStringArgs() { String[] args = { "arg1", "arg2" }; CommandArguments commandArguments = mock(CommandArguments.class); CommandArguments commandArgumentsWithArgs = mock(CommandArguments.class); - when(commandArguments.addObjects(args)).thenReturn(commandArgumentsWithArgs); + when(commandArguments.addObjects((Object[]) args)).thenReturn(commandArgumentsWithArgs); when(commandObjects.commandArguments(cmd)).thenReturn(commandArguments); when(commandExecutor.executeCommand(any())).thenReturn("OK"); @@ -126,7 +126,7 @@ public void testSendBlockingCommandWithProtocolCommandAndStringArgs() { CommandArguments commandArgumentsWithArgs = mock(CommandArguments.class); when(commandArgumentsWithArgs.blocking()).thenReturn(commandArgumentsBlocking); - when(commandArguments.addObjects(args)).thenReturn(commandArgumentsWithArgs); + when(commandArguments.addObjects((Object[]) args)).thenReturn(commandArgumentsWithArgs); when(commandObjects.commandArguments(cmd)).thenReturn(commandArguments); when(commandExecutor.executeCommand(any())).thenReturn("OK");