Skip to content

Commit

Permalink
Resolve compile warnings
Browse files Browse the repository at this point in the history
with message `... non-varargs call of varargs method with inexact argument type for last parameter; ...`
  • Loading branch information
sazzad16 committed Apr 8, 2024
1 parent d3ab354 commit a149789
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand All @@ -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");
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit a149789

Please sign in to comment.